diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2012-10-17 02:31:33 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-10-23 02:44:08 -0400 |
commit | 4f053a24eca933ec10ce68eef61d38d179f34e50 (patch) | |
tree | c2fe9ec27d22d8595672c0100dd8c70895f96480 /drivers | |
parent | 000b7f5127900f695668191353a3291832c1914e (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/renesas_usbhs/mod_host.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/mod_host.c b/drivers/usb/renesas_usbhs/mod_host.c index 9b69a1323294..069cd765400c 100644 --- a/drivers/usb/renesas_usbhs/mod_host.c +++ b/drivers/usb/renesas_usbhs/mod_host.c | |||
@@ -334,6 +334,11 @@ static void usbhsh_pipe_detach(struct usbhsh_hpriv *hpriv, | |||
334 | struct device *dev = usbhs_priv_to_dev(priv); | 334 | struct device *dev = usbhs_priv_to_dev(priv); |
335 | unsigned long flags; | 335 | unsigned long flags; |
336 | 336 | ||
337 | if (unlikely(!uep)) { | ||
338 | dev_err(dev, "no uep\n"); | ||
339 | return; | ||
340 | } | ||
341 | |||
337 | /******************** spin lock ********************/ | 342 | /******************** spin lock ********************/ |
338 | usbhs_lock(priv, flags); | 343 | usbhs_lock(priv, flags); |
339 | 344 | ||