summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWesley Cheng <wcheng@codeaurora.org>2021-05-07 10:55:19 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-19 10:29:54 +0200
commit19e7bf52c7fee140a5d91808c77b5271cdcb1d0d (patch)
tree3a63a18c46228439a1c02e618f178668cb8676bd
parent56245530f2746958e52e2b7f637d42723fbf5446 (diff)
downloadlinux-stable-19e7bf52c7fee140a5d91808c77b5271cdcb1d0d.tar.gz
linux-stable-19e7bf52c7fee140a5d91808c77b5271cdcb1d0d.tar.bz2
linux-stable-19e7bf52c7fee140a5d91808c77b5271cdcb1d0d.zip
usb: dwc3: gadget: Return success always for kick transfer in ep queue
commit 18ffa988dbae69cc6e9949cddd9606f6fe533894 upstream. If an error is received when issuing a start or update transfer command, the error handler will stop all active requests (including the current USB request), and call dwc3_gadget_giveback() to notify function drivers of the requests which have been stopped. Avoid returning an error for kick transfer during EP queue, to remove duplicate cleanup operations on the request being queued. Fixes: 8d99087c2db8 ("usb: dwc3: gadget: Properly handle failed kick_transfer") cc: stable@vger.kernel.org Signed-off-by: Wesley Cheng <wcheng@codeaurora.org> Link: https://lore.kernel.org/r/1620410119-24971-1-git-send-email-wcheng@codeaurora.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/dwc3/gadget.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 931ce5e31d37..acf57a98969d 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -1676,7 +1676,9 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
}
}
- return __dwc3_gadget_kick_transfer(dep);
+ __dwc3_gadget_kick_transfer(dep);
+
+ return 0;
}
static int dwc3_gadget_ep_queue(struct usb_ep *ep, struct usb_request *request,