android_kernel_google_msm/drivers/usb/renesas_usbhs
Kazuya Mizuguchi 6a2fa48e01 usb: renesas_usbhs: gadget: fix NULL pointer dereference in ep_disable()
commit 11432050f070810ba139d0226344eef120c3a559 upstream.

This patch fixes an issue that the NULL pointer dereference happens
when we uses g_audio driver. Since the g_audio driver will call
usb_ep_disable() in afunc_set_alt() before it calls usb_ep_enable(),
the uep->pipe of renesas usbhs driver will be NULL. So, this patch
adds a condition to avoid the oops.

Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Fixes: 2f98382dc (usb: renesas_usbhs: Add Renesas USBHS Gadget)
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-04-14 17:33:41 +08:00
..
common.c usb: renesas_usbhs: add IRQ resource decoding for IRQF_SHARED 2012-01-24 11:32:56 +02:00
common.h usb: renesas_usbhs: add IRQ resource decoding for IRQF_SHARED 2012-01-24 11:32:56 +02:00
fifo.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-03-29 15:34:57 -07:00
fifo.h usb: renesas: fix scheduling in atomic context bug 2012-02-14 13:44:53 +02:00
Kconfig usb: gadget: renesas_usbhs: drop dependency 2011-10-13 20:41:54 +03:00
Makefile usb: gadget: renesas_usbhs: fixup driver compile style 2011-10-13 20:41:54 +03:00
mod.c usb: renesas_usbhs: add IRQ resource decoding for IRQF_SHARED 2012-01-24 11:32:56 +02:00
mod.h usb: gadget: renesas_usbhs: fixup section mismatch warning 2011-11-14 11:51:23 -08:00
mod_gadget.c usb: renesas_usbhs: gadget: fix NULL pointer dereference in ep_disable() 2015-04-14 17:33:41 +08:00
mod_host.c Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb 2012-01-09 12:09:47 -08:00
pipe.c usb: renesas: pipe: convert a long if into a XOR operation 2011-12-21 13:24:43 +02:00
pipe.h usb: renesas_usbhs: add usbhs_pipe_is_stall() 2011-12-12 11:45:15 +02:00