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:
@@ -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[] = {
|
||||
|
Reference in New Issue
Block a user