Skip to contentSkip to conversation

patch "usb: renesas_usbhs: gadget: fix return value check in" added to usb-linus

PATCH [email protected] 1 participant 1 message Aug 25, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

usb: renesas_usbhs: gadget: fix return value check in

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From 3295235fd70ed6d594aadee8c892a14f6a4b2d2e Mon Sep 17 00:00:00 2001

From: Wei Yongjun <[email protected]>
Date: Sat, 13 Aug 2016 01:28:24 +0000
Subject: 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 b5a2875605ca ("usb: renesas_usbhs: Allow an OTG PHY driver to

provide VBUS")

---
 drivers/usb/renesas_usbhs/mod_gadget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/renesas_usbhs/mod_gadget.c +1 -1
index 92bc83b92d10..c4c64740a3e7 100644
@@ -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
Signature · 1 line
2.9.3