diff options
author | Felipe Balbi <balbi@ti.com> | 2013-03-15 04:57:40 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-03-18 05:18:29 -0400 |
commit | a90199bb947856c24d7bf78845d24f802e09db0a (patch) | |
tree | df24588c023b8f9963af605d5bc4d23ee6f46a23 | |
parent | f4f5ba5e7d9e087f044fe87f5a5421761274aa48 (diff) |
usb: musb: omap2430: fix PHY error handling
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>
-rw-r--r-- | drivers/usb/musb/omap2430.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index ec460eaed842..798e029e3db0 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -353,7 +353,12 @@ static int omap2430_musb_init(struct musb *musb) | |||
353 | else | 353 | else |
354 | musb->xceiv = devm_usb_get_phy_dev(dev, 0); | 354 | musb->xceiv = devm_usb_get_phy_dev(dev, 0); |
355 | 355 | ||
356 | if (IS_ERR_OR_NULL(musb->xceiv)) { | 356 | if (IS_ERR(musb->xceiv)) { |
357 | status = PTR_ERR(musb->xceiv); | ||
358 | |||
359 | if (status == -ENXIO) | ||
360 | return status; | ||
361 | |||
357 | pr_err("HS USB OTG: no transceiver configured\n"); | 362 | pr_err("HS USB OTG: no transceiver configured\n"); |
358 | return -EPROBE_DEFER; | 363 | return -EPROBE_DEFER; |
359 | } | 364 | } |