aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/ux500.c
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2012-06-26 08:10:32 -0400
committerFelipe Balbi <balbi@ti.com>2012-07-02 03:40:49 -0400
commitded017ee6c7b90f7356bd8488f8af1c10ba90490 (patch)
tree1ed1612aa13f24e1aa8480fb497d2a0311fae9cc /drivers/usb/musb/ux500.c
parentb8a3efa3a363720687d21228d6b23b988a223bbb (diff)
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/ux500.c')
-rw-r--r--drivers/usb/musb/ux500.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c
index 46cf80a8cacd..a8c0fadce1b0 100644
--- a/drivers/usb/musb/ux500.c
+++ b/drivers/usb/musb/ux500.c
@@ -23,6 +23,7 @@
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/clk.h> 25#include <linux/clk.h>
26#include <linux/err.h>
26#include <linux/io.h> 27#include <linux/io.h>
27#include <linux/platform_device.h> 28#include <linux/platform_device.h>
28 29
@@ -38,7 +39,7 @@ struct ux500_glue {
38static int ux500_musb_init(struct musb *musb) 39static int ux500_musb_init(struct musb *musb)
39{ 40{
40 musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); 41 musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
41 if (!musb->xceiv) { 42 if (IS_ERR_OR_NULL(musb->xceiv)) {
42 pr_err("HS USB OTG: no transceiver configured\n"); 43 pr_err("HS USB OTG: no transceiver configured\n");
43 return -ENODEV; 44 return -ENODEV;
44 } 45 }