[alsa-devel] [PATCH 25/28] Ensure all adapter data is cleared on device removal.
linux at audioscience.com
linux at audioscience.com
Thu Feb 10 05:26:18 CET 2011
From: Eliot Blennerhassett <eblennerhassett at audioscience.com>
Signed-off-by: Eliot Blennerhassett <eblennerhassett at audioscience.com>
---
pci/asihpi/hpioctl.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pci/asihpi/hpioctl.c b/pci/asihpi/hpioctl.c
index 0ea9aae..26186be 100644
--- a/pci/asihpi/hpioctl.c
+++ b/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)
--
1.7.0.4
More information about the Alsa-devel
mailing list