Skip to content

Commit 3295235

Browse files
weiyjFelipe Balbi
authored andcommitted
usb: renesas_usbhs: gadget: fix return value check in usbhs_mod_gadget_probe()
In case of error, the function usb_get_phy() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: b5a2875 ("usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS") Cc: <[email protected]> # v4.3+ Acked-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent 83f8da5 commit 3295235

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/renesas_usbhs/mod_gadget.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
10761076

10771077
gpriv->transceiver = usb_get_phy(USB_PHY_TYPE_UNDEFINED);
10781078
dev_info(dev, "%stransceiver found\n",
1079-
gpriv->transceiver ? "" : "no ");
1079+
!IS_ERR(gpriv->transceiver) ? "" : "no ");
10801080

10811081
/*
10821082
* CAUTION

0 commit comments

Comments
 (0)