aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>2016-03-03 04:35:51 -0500
committerFelipe Balbi <balbi@kernel.org>2016-03-04 08:14:48 -0500
commit11ebf3ad3b871d262491790e3b273e963d4c3c28 (patch)
treec5d2716942296d9617d1ec551bfd8362f6f96d13
parentdd9fee67985882fd05fcf252fb4500265cb3fdcb (diff)
usb: renesas_usbhs: gadget: fix giveback status code in usbhsg_pipe_disable()
A udc driver should set the giveback status to -ESHUTDOWN in usb_ep_disable(). Otherwise, a gadget driver (e.g. g_serial) might request next data wrongly and it is possible to cause kernel panic. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
-rw-r--r--drivers/usb/renesas_usbhs/mod_gadget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
index 657f9672ceba..664b263e4b20 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -561,7 +561,7 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep)
561 if (!pkt) 561 if (!pkt)
562 break; 562 break;
563 563
564 usbhsg_queue_pop(uep, usbhsg_pkt_to_ureq(pkt), -ECONNRESET); 564 usbhsg_queue_pop(uep, usbhsg_pkt_to_ureq(pkt), -ESHUTDOWN);
565 } 565 }
566 566
567 usbhs_pipe_disable(pipe); 567 usbhs_pipe_disable(pipe);