提交 3e434a86 编写于 作者: J Jarkko Nikula 提交者: Felipe Balbi

usb: ehci-omap: Show fatal probing time errors to end user

There are a few error paths in ehci_hcd_omap_probe that can be triggered
because of memory allocation or hw failure. Change those dev_dbg error
prints to dev_err with an error code printed so that the end users are able
to notice the issue.
Signed-off-by: NJarkko Nikula <jhnikula@gmail.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 5f5761cb
...@@ -796,7 +796,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) ...@@ -796,7 +796,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
hcd = usb_create_hcd(&ehci_omap_hc_driver, &pdev->dev, hcd = usb_create_hcd(&ehci_omap_hc_driver, &pdev->dev,
dev_name(&pdev->dev)); dev_name(&pdev->dev));
if (!hcd) { if (!hcd) {
dev_dbg(&pdev->dev, "failed to create hcd with err %d\n", ret); dev_err(&pdev->dev, "failed to create hcd with err %d\n", ret);
ret = -ENOMEM; ret = -ENOMEM;
goto err_create_hcd; goto err_create_hcd;
} }
...@@ -864,7 +864,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) ...@@ -864,7 +864,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
ret = omap_start_ehc(omap, hcd); ret = omap_start_ehc(omap, hcd);
if (ret) { if (ret) {
dev_dbg(&pdev->dev, "failed to start ehci\n"); dev_err(&pdev->dev, "failed to start ehci with err %d\n", ret);
goto err_start; goto err_start;
} }
...@@ -879,7 +879,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) ...@@ -879,7 +879,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
ret = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED); ret = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
if (ret) { if (ret) {
dev_dbg(&pdev->dev, "failed to add hcd with err %d\n", ret); dev_err(&pdev->dev, "failed to add hcd with err %d\n", ret);
goto err_add_hcd; goto err_add_hcd;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册