From 1aa56cca5bfa396c791e93b38e4776ef39b590a7 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 27 Feb 2007 22:33:21 +0900 Subject: 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 Signed-off-by: Jeff Garzik --- drivers/ata/pata_cs5520.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/ata/pata_cs5520.c') 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) struct ata_host *host = dev_get_drvdata(dev); ata_host_detach(host); - dev_set_drvdata(dev, NULL); } /** -- cgit v1.2.2