summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/omap2430.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2013-03-15 09:57:40 +0100
committerFelipe Balbi <balbi@ti.com>2013-03-18 10:18:29 +0100
commita90199bb947856c24d7bf78845d24f802e09db0a (patch)
treedf24588c023b8f9963af605d5bc4d23ee6f46a23 /drivers/usb/musb/omap2430.c
parentusb: gadget: s3c-hsotg: fix PHY error handling (diff)
downloadlinux-a90199bb947856c24d7bf78845d24f802e09db0a.tar.xz
linux-a90199bb947856c24d7bf78845d24f802e09db0a.zip
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>
Diffstat (limited to 'drivers/usb/musb/omap2430.c')
-rw-r--r--drivers/usb/musb/omap2430.c7
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)
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;
}