]> git.baikalelectronics.ru Git - kernel.git/commit
usb: renesas_usbhs: gadget: Fix NULL pointer dereference in usbhsg_ep_dequeue()
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Wed, 18 Nov 2015 05:33:35 +0000 (14:33 +0900)
committerFelipe Balbi <balbi@ti.com>
Thu, 19 Nov 2015 20:48:48 +0000 (14:48 -0600)
commit5f94847238800e7a5aa7b2d8c1ed847a8610480f
tree4f71dac568833c1992a68c84e68873b8c68792f8
parent6fdfee05260f7eb5fab3fa079a3f9ba87a908881
usb: renesas_usbhs: gadget: Fix NULL pointer dereference in usbhsg_ep_dequeue()

This patch fixes an issue that NULL pointer dereference happens when
a gadget driver calls usb_ep_dequeue() for ep0 after disconnected
a usb cable. This is because that usbhsg_try_stop() will call
usbhsg_ep_disable(&dcp->ep) when a usb cable is disconnected and
the pipe of dcp (ep0) is set to NULL.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/renesas_usbhs/mod_gadget.c