You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user