[linux-dvb] inconsistent use of saa7146_pgtable_free?

Jon Burgess jburgess777 at googlemail.com
Thu Apr 19 21:40:25 CEST 2007


I've been looking at the sa7146 page table code and it looks like the
saa7146_pgtable_free function is used incorrectly in the error cases:

from budget-core.c:
ttpci_budget_init()
{
...
    budget->grabbing = saa7146_vmalloc_build_pgtable(dev->pci, budget->buffer_size, &budget->pt))
...
err:
	i2c_del_adapter(&budget->i2c_adap);

	vfree(budget->grabbing);
}

vs:
ttpci_budget_deinit()
{
...
	saa7146_pgtable_free(dev->pci, &budget->pt);


Shouldn't the vfree() above be a call to saa7146_pgtable_free() ?


Also in av7110.c:
av7110_attach()
{
...
    av7110->grabbing = saa7146_vmalloc_build_pgtable(pdev, length, &av7110->pt);
...
err_saa71466_vfree_4:
	if (!av7110->grabbing)
		saa7146_pgtable_free(pdev, &av7110->pt);
...


Surely the (!av7110->grabbing) should be (av7110->grabbing) ?


	Jon





More information about the linux-dvb mailing list