Skip to contentSkip to conversation

Patch "usb: renesas_usbhs: gadget: fix return value check in usbhs_mod_gadget_probe()" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Sep 5, 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 usbhs_mod_gadget_probe()

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
usb-renesas_usbhs-gadget-fix-return-value-check-in-usbhs_mod_gadget_probe.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

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()

From: Wei Yongjun <[email protected]>

commit 3295235fd70ed6d594aadee8c892a14f6a4b2d2e upstream.

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
@@ -1075,7 +1075,7 @@ int usbhs_mod_gadget_probe(struct usbhs_
 
 	gpriv->transceiver = usb_get_phy(USB_PHY_TYPE_UNDEFINED);
 	dev_info(dev, "%stransceiver found\n",
-		 gpriv->transceiver ? "" : "no ");
+		 !IS_ERR(gpriv->transceiver) ? "" : "no ");
 
 	/*
 	 * CAUTION

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/virtio-fix-memory-leak-in-virtqueue_add.patch queue-4.4/usb-renesas_usbhs-gadget-fix-return-value-check-in-usbhs_mod_gadget_probe.patch