Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: renesas_usbhs: fixup: avoid NULL access on error case pipe detach

If renesas_usbhs or DMAEngine interrupt didn't happen by a certain cause,
urb->ep will be NULL by usb time out.
Then, host mode will access to it and crash kernel.
This patch fixes it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>

authored by

Kuninori Morimoto and committed by
Felipe Balbi
4f053a24 000b7f51

+5
+5
drivers/usb/renesas_usbhs/mod_host.c
··· 334 334 struct device *dev = usbhs_priv_to_dev(priv); 335 335 unsigned long flags; 336 336 337 + if (unlikely(!uep)) { 338 + dev_err(dev, "no uep\n"); 339 + return; 340 + } 341 + 337 342 /******************** spin lock ********************/ 338 343 usbhs_lock(priv, flags); 339 344