mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
pata_legacy: fix no device fail path
When pata_legacy can't detect any device, it unregisters the platform_device and fails detection. However, it forgets to detach ata host triggering weird failures as the host later gets freed by devres while still attached. Fix it. Signed-off-by: Tejun Heo <[email protected]> Reported-by: Peter Zijlstra <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
This commit is contained in:
parent
265b7215ae
commit
20cbf5f8c0
1 changed files with 1 additions and 0 deletions
|
|
@ -1032,6 +1032,7 @@ static __init int legacy_init_one(struct legacy_probe *probe)
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
ata_host_detach(host);
|
||||
fail:
|
||||
platform_device_unregister(pdev);
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue