From ded017ee6c7b90f7356bd8488f8af1c10ba90490 Mon Sep 17 00:00:00 2001 From: Kishon Vijay Abraham I Date: Tue, 26 Jun 2012 17:40:32 +0530 Subject: 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 Signed-off-by: Felipe Balbi --- drivers/power/isp1704_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/power/isp1704_charger.c') 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) return -ENOMEM; isp->phy = usb_get_phy(USB_PHY_TYPE_USB2); - if (!isp->phy) + if (IS_ERR_OR_NULL(isp->phy)) goto fail0; isp->dev = &pdev->dev; -- cgit v1.2.3