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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <stable@xxxxxxxxxxxxxxx> know about it.


>From 3295235fd70ed6d594aadee8c892a14f6a4b2d2e Mon Sep 17 00:00:00 2001
From: Wei Yongjun <weiyj.lk@xxxxxxxxx>
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 <weiyj.lk@xxxxxxxxx>

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")
Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
Signed-off-by: Wei Yongjun <weiyj.lk@xxxxxxxxx>
Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/usb/renesas_usbhs/mod_gadget.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -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 weiyj.lk@xxxxxxxxx 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
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]