ALSA: asihpi - Ensure all adapter data is cleared on device removal.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Eliot Blennerhassett 2011-02-10 17:26:18 +13:00 committed by Takashi Iwai
parent a287ca2ade
commit c188dec310
1 changed files with 3 additions and 3 deletions

View File

@ -449,10 +449,8 @@ void __devexit asihpi_adapter_remove(struct pci_dev *pci_dev)
}
}
if (pa->p_buffer) {
pa->buffer_size = 0;
if (pa->p_buffer)
vfree(pa->p_buffer);
}
pci_set_drvdata(pci_dev, NULL);
if (1)
@ -461,6 +459,8 @@ void __devexit asihpi_adapter_remove(struct pci_dev *pci_dev)
pci_dev->vendor, pci_dev->device,
pci_dev->subsystem_vendor, pci_dev->subsystem_device,
pci_dev->devfn, pa->index);
memset(pa, 0, sizeof(*pa));
}
void __init asihpi_init(void)