Skip to content

Commit

Permalink
usb: ehci-omap: Show fatal probing time errors to end user
Browse files Browse the repository at this point in the history
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: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Jarkko Nikula authored and Felipe Balbi committed Feb 1, 2011
1 parent 5f5761c commit 3e434a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/usb/host/ehci-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
hcd = usb_create_hcd(&ehci_omap_hc_driver, &pdev->dev,
dev_name(&pdev->dev));
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;
goto err_create_hcd;
}
Expand Down Expand Up @@ -864,7 +864,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)

ret = omap_start_ehc(omap, hcd);
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;
}

Expand All @@ -879,7 +879,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)

ret = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
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;
}

Expand Down

0 comments on commit 3e434a8

Please sign in to comment.