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>
This commit is contained in:
Tejun Heo
2007-02-27 22:33:21 +09:00
committed by Jeff Garzik
parent 7b965e0884
commit 1aa56cca5b
4 changed files with 2 additions and 4 deletions

View File

@@ -228,7 +228,6 @@ static int __devexit pata_platform_remove(struct platform_device *pdev)
struct ata_host *host = dev_get_drvdata(dev);
ata_host_detach(host);
dev_set_drvdata(dev, NULL);
return 0;
}