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

@@ -128,7 +128,6 @@ static void isapnp_remove_one(struct pnp_dev *idev)
struct ata_host *host = dev_get_drvdata(dev);
ata_host_detach(host);
dev_set_drvdata(dev, NULL);
}
static struct pnp_device_id isapnp_devices[] = {