usb: renesas_usbhs: gadget: Fix NULL pointer dereference in usbhsg_ep_dequeue()

commit c9eb29503e upstream.

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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
Yoshihiro Shimoda 2015-11-18 14:33:35 +09:00 • committed by Ben Hutchings
commit 17a8d42b76