aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_cs5520.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-02-27 08:33:21 -0500
committerJeff Garzik <jeff@garzik.org>2007-03-01 20:16:28 -0500
commit1aa56cca5bfa396c791e93b38e4776ef39b590a7 (patch)
treec4e88e2195dfc1db88c932e5c2b9adb151bb9d65 /drivers/ata/pata_cs5520.c
parent7b965e0884cee430ffe5dc81cdb117b9316b0549 (diff)
libata: clear drvdata in ata_host_release(), take#2
Clearing drvdata in ->remove_one causes NULL pointer deference. Clear drvdata only in ata_host_release() after all resources are freed. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/pata_cs5520.c')
-rw-r--r--drivers/ata/pata_cs5520.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
index c1334c6c4156..8ff2d58c599e 100644
--- a/drivers/ata/pata_cs5520.c
+++ b/drivers/ata/pata_cs5520.c
@@ -306,7 +306,6 @@ static void __devexit cs5520_remove_one(struct pci_dev *pdev)
306 struct ata_host *host = dev_get_drvdata(dev); 306 struct ata_host *host = dev_get_drvdata(dev);
307 307
308 ata_host_detach(host); 308 ata_host_detach(host);
309 dev_set_drvdata(dev, NULL);
310} 309}
311 310
312/** 311/**