diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index dddd53230594..2852d8a62a9e 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -3533,14 +3533,14 @@ static bool dwc3_gadget_endpoint_trbs_complete(struct dwc3_ep *dep, struct dwc3_request *req, *tmp; bool no_started_trb = true; - if (!dep->endpoint.desc) - return no_started_trb; - dwc3_gadget_ep_cleanup_completed_requests(dep, event, status); if (dep->flags & DWC3_EP_END_TRANSFER_PENDING) goto out; + if (!dep->endpoint.desc) + return no_started_trb; + /* * If MISS ISOC happens, we need to do the following three steps * to restart the reqs in the cancelled_list and pending_list