usb: dwc3: gadget: Return success always for kick transfer in ep queue
authorWesley Cheng <wcheng@codeaurora.org>
Fri, 7 May 2021 17:55:19 +0000 (10:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:13:15 +0000 (10:13 +0200)
commit9bd96a2e77fd71b39bfa3f710f6001f94da57c51
treea51ce2a4ee937f5fdcb4dae8f30ab673a6055cdd
parent45f37f54e7c16e2981ba3a847c0778fd561888c3
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>
drivers/usb/dwc3/gadget.c