提交 20cbf5f8 编写于 作者: T Tejun Heo 提交者: Jeff Garzik

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: NTejun Heo <tj@kernel.org>
Reported-by: NPeter Zijlstra <peterz@infradead.org>
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 265b7215
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册