usb: phy: Use IS_ERR instead of PTR_ERR with eusb2 PHY driver

devm_usb_get_repeater_by_phandle() shall returns ERR_PTR (if usb
repeater device is not found) or pointer to usb repeater
device. Using PTR_ERR against this return value would always
result into true causing eUSB2 PHY driver probe failure. Fix
this issue by using IS_ERR instead of PTR_ERR.

Change-Id: I538160bf0192c7f9e5f75450949dd5161de0e3be
Signed-off-by: Mayank Rana <quic_mrana@quicinc.com>
This commit is contained in:
Mayank Rana 2022-01-26 15:31:21 -08:00 committed by Gerrit - the friendly Code Review server
parent b29f5124eb
commit 8d6752dae7

View File

@ -888,7 +888,7 @@ static int msm_eusb2_phy_probe(struct platform_device *pdev)
}
ur = devm_usb_get_repeater_by_phandle(dev, "usb-repeater", 0);
if (PTR_ERR(ur)) {
if (IS_ERR(ur)) {
ret = PTR_ERR(ur);
goto err_ret;
}