mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
This commit is contained in:
parent
dd9fee6798
commit
11ebf3ad3b
1 changed files with 1 additions and 1 deletions
|
|
@ -561,7 +561,7 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep)
|
|||
if (!pkt)
|
||||
break;
|
||||
|
||||
usbhsg_queue_pop(uep, usbhsg_pkt_to_ureq(pkt), -ECONNRESET);
|
||||
usbhsg_queue_pop(uep, usbhsg_pkt_to_ureq(pkt), -ESHUTDOWN);
|
||||
}
|
||||
|
||||
usbhs_pipe_disable(pipe);
|
||||
|
|
|
|||
Loading…
Reference in a new issue