mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00: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 <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
This commit is contained in:
parent
dd9fee6798
commit
11ebf3ad3b
@ -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 New Issue
Block a user