Commit 11ebf3ad authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Felipe Balbi

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: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent dd9fee67
...@@ -561,7 +561,7 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep) ...@@ -561,7 +561,7 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep)
if (!pkt) if (!pkt)
break; 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); usbhs_pipe_disable(pipe);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment