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: b5a2875605 ("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>
This commit is contained in:
Wei Yongjun 2016-08-13 01:28:24 +00:00 committed by Felipe Balbi
parent 83f8da562f
commit 3295235fd7

View file

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