It might happen that all requests are already cleaned before event for end transfer completion is received. So do not call cleanup for such case. Otherwise, it generates a warning which is not in actual. Signed-off-by: Pratyush Anand <pratyush.anand@xxxxxx> --- drivers/usb/dwc3/gadget.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 61fe6e1..fb14d44 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1754,7 +1754,8 @@ static void dwc3_process_ep_cmd_complete(struct dwc3_ep *dep, * the end of the list. */ mod_ev.status = DEPEVT_STATUS_LST; - dwc3_cleanup_done_reqs(dwc, dep, &mod_ev, -ESHUTDOWN); + if (!list_empty(&dep->req_queued)) + dwc3_cleanup_done_reqs(dwc, dep, &mod_ev, -ESHUTDOWN); dep->flags &= ~DWC3_EP_BUSY; /* pending requests are ignored and are queued on XferNotReady */ } -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html