Skip to content

Commit

Permalink
usb: musb: omap2430: fix PHY error handling
Browse files Browse the repository at this point in the history
PHY layer no longer returns NULL. It will
return -ENXIO when PHY layer isn't enabled
and we can use that to bail out instead of
request a probe deferral.

Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Mar 18, 2013
1 parent f4f5ba5 commit a90199b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/usb/musb/omap2430.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,12 @@ static int omap2430_musb_init(struct musb *musb)
else
musb->xceiv = devm_usb_get_phy_dev(dev, 0);

if (IS_ERR_OR_NULL(musb->xceiv)) {
if (IS_ERR(musb->xceiv)) {
status = PTR_ERR(musb->xceiv);

if (status == -ENXIO)
return status;

pr_err("HS USB OTG: no transceiver configured\n");
return -EPROBE_DEFER;
}
Expand Down

0 comments on commit a90199b

Please sign in to comment.