diff options
author | Eliot Blennerhassett <eblennerhassett@audioscience.com> | 2011-02-10 05:26:18 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-02-10 18:49:38 +0100 |
commit | c188dec310c598d6c38d3db31f201c5629e6dc08 (patch) | |
tree | 92dd1a2569e9aac7cfa20c9e7fcc2ebe84b27f87 | |
parent | ALSA: asihpi - Minor define updates (diff) | |
download | linux-c188dec310c598d6c38d3db31f201c5629e6dc08.tar.xz linux-c188dec310c598d6c38d3db31f201c5629e6dc08.zip |
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>
-rw-r--r-- | sound/pci/asihpi/hpioctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/asihpi/hpioctl.c b/sound/pci/asihpi/hpioctl.c index 0ea9aae8011b..26186be638b1 100644 --- a/sound/pci/asihpi/hpioctl.c +++ b/sound/pci/asihpi/hpioctl.c @@ -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) |