diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2012-06-26 17:40:32 +0530 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-07-02 10:40:49 +0300 |
commit | ded017ee6c7b90f7356bd8488f8af1c10ba90490 (patch) | |
tree | 1ed1612aa13f24e1aa8480fb497d2a0311fae9cc /drivers/usb/musb/omap2430.c | |
parent | b8a3efa3a363720687d21228d6b23b988a223bbb (diff) | |
download | op-kernel-dev-ded017ee6c7b90f7356bd8488f8af1c10ba90490.zip op-kernel-dev-ded017ee6c7b90f7356bd8488f8af1c10ba90490.tar.gz |
usb: phy: fix return value check of usb_get_phy
usb_get_phy will return -ENODEV if it's not able to find the phy. Hence
fixed all the callers of usb_get_phy to check for this error condition
instead of relying on a non-zero value as success condition.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/omap2430.c')
-rw-r--r-- | drivers/usb/musb/omap2430.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 2813490..5fdb9da 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -320,7 +320,7 @@ static int omap2430_musb_init(struct musb *musb) * which needs a driver, drivers aren't always needed. */ musb->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2); - if (!musb->xceiv) { + if (IS_ERR_OR_NULL(musb->xceiv)) { pr_err("HS USB OTG: no transceiver configured\n"); return -ENODEV; } |