提交 984e9748 编写于 作者: R Russ Dill 提交者: Greg Kroah-Hartman

ARM: OMAP: USB: Fixup ehci_hcd_omap_probe error path

A recent commit, [PATCH] Fix OMAP EHCI suspend/resume failure
(i693) '354ab856' causes ehci probe to fail on omap3xxx. This
exposed bugs in the ehci_hcd_omap_probe error path causing
an oops.

On the error path, call usb_remove_hcd if usb_add_hcd has been
called, and call usb_put_hcd if usb_alloc_hcd has been called.

Tested on BB-xM.

Signed-off-by: Russ.Dill@ti.com
Acked-by: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 a46af4eb
无相关合并请求
......@@ -347,7 +347,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
if (ret) {
dev_err(dev, "failed to add hcd with err %d\n", ret);
goto err_add_hcd;
goto err_pm_runtime;
}
/* root ports should always stay powered */
......@@ -424,8 +424,12 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
clk_put(utmi_p1_fck);
err_add_hcd:
usb_remove_hcd(hcd);
err_pm_runtime:
disable_put_regulator(pdata);
pm_runtime_put_sync(dev);
usb_put_hcd(hcd);
err_io:
iounmap(regs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部