Skip to content

Commit

Permalink
usb: renesas_usbhs: gadget: fix return value check in usbhs_mod_gadge…
Browse files Browse the repository at this point in the history
…t_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: <stable@vger.kernel.org> # v4.3+
Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
  • Loading branch information
Wei Yongjun authored and Felipe Balbi committed Aug 22, 2016
1 parent 83f8da5 commit 3295235
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/renesas_usbhs/mod_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)

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

/*
* CAUTION
Expand Down

0 comments on commit 3295235

Please sign in to comment.