usb: dwc3: gadget: simplify isoc case on cleanup_completed_requests
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 29 Mar 2018 10:25:40 +0000 (13:25 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 21 May 2018 07:00:54 +0000 (10:00 +0300)
Just a minor simplification, no functional changes.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c

index ffa84e0..2c79563 100644 (file)
@@ -2351,16 +2351,9 @@ static void dwc3_gadget_ep_cleanup_completed_requests(struct dwc3_ep *dep,
                return;
 
        if (usb_endpoint_xfer_isoc(dep->endpoint.desc) &&
-                       list_empty(&dep->started_list)) {
-               if (list_empty(&dep->pending_list)) {
-                       /*
-                        * If there is no entry in request list then do
-                        * not issue END TRANSFER now. Just set PENDING
-                        * flag, so that END TRANSFER is issued when an
-                        * entry is added into request list.
-                        */
-                       dep->flags = DWC3_EP_PENDING_REQUEST;
-               }
+                       list_empty(&dep->started_list) &&
+                       list_empty(&dep->pending_list)) {
+               dep->flags = DWC3_EP_PENDING_REQUEST;
        }
 }