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>
Šī revīzija ir iekļauta:
Kishon Vijay Abraham I
2012-06-26 17:40:32 +05:30
revīziju iesūtīja Felipe Balbi
vecāks b8a3efa3a3
revīzija ded017ee6c
25 mainīti faili ar 96 papildinājumiem un 77 dzēšanām

Parādīt failu

@@ -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;