diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2012-06-26 08:10:32 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-07-02 03:40:49 -0400 |
commit | ded017ee6c7b90f7356bd8488f8af1c10ba90490 (patch) | |
tree | 1ed1612aa13f24e1aa8480fb497d2a0311fae9cc /drivers/power/isp1704_charger.c | |
parent | b8a3efa3a363720687d21228d6b23b988a223bbb (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/power/isp1704_charger.c')
-rw-r--r-- | drivers/power/isp1704_charger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/isp1704_charger.c b/drivers/power/isp1704_charger.c index 090e5f9e72c9..122911978da2 100644 --- a/drivers/power/isp1704_charger.c +++ b/drivers/power/isp1704_charger.c | |||
@@ -416,7 +416,7 @@ static int __devinit isp1704_charger_probe(struct platform_device *pdev) | |||
416 | return -ENOMEM; | 416 | return -ENOMEM; |
417 | 417 | ||
418 | isp->phy = usb_get_phy(USB_PHY_TYPE_USB2); | 418 | isp->phy = usb_get_phy(USB_PHY_TYPE_USB2); |
419 | if (!isp->phy) | 419 | if (IS_ERR_OR_NULL(isp->phy)) |
420 | goto fail0; | 420 | goto fail0; |
421 | 421 | ||
422 | isp->dev = &pdev->dev; | 422 | isp->dev = &pdev->dev; |