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:

revīziju iesūtīja
Felipe Balbi

vecāks
b8a3efa3a3
revīzija
ded017ee6c
@@ -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;
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user