diff options
author | Tejun Heo <htejun@gmail.com> | 2009-04-13 23:59:03 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-04-16 15:21:22 -0400 |
commit | 20cbf5f8c0fe3df2ddbde1f334993b4dda18a651 (patch) | |
tree | 3d2c56462b8aa128f4e6c5cfd65d81a9fd227e6e /drivers/ata/pata_legacy.c | |
parent | 265b7215aed36941620b65ecfff516200fb190c1 (diff) |
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 <tj@kernel.org>
Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_legacy.c')
-rw-r--r-- | drivers/ata/pata_legacy.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index 3f830f0fe2cc..0c6dde80417b 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c | |||
@@ -1032,6 +1032,7 @@ static __init int legacy_init_one(struct legacy_probe *probe) | |||
1032 | return 0; | 1032 | return 0; |
1033 | } | 1033 | } |
1034 | } | 1034 | } |
1035 | ata_host_detach(host); | ||
1035 | fail: | 1036 | fail: |
1036 | platform_device_unregister(pdev); | 1037 | platform_device_unregister(pdev); |
1037 | return ret; | 1038 | return ret; |