]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
USB: UDC: net2280: Remove redundant "if" condition
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 15 Apr 2019 17:36:58 +0000 (13:36 -0400)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 3 May 2019 06:13:47 +0000 (09:13 +0300)
The net2280 driver includes an unnecessary test for an endpoint's
queue being empty.  The test is redundant; it sits inside a
conditional block of an "if" statement which already tests the
endpoint's queue.

This patch removes the redundant test.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/net2280.c

index 898339e5df10d83d211942609a9bd695f199e787..b17473a00b430f8522dc3fcd7cf3c5e74b9ebf9f 100644 (file)
@@ -1058,7 +1058,7 @@ net2280_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
                        /* PIO ... stuff the fifo, or unblock it.  */
                        if (ep->is_in)
                                write_fifo(ep, _req);
-                       else if (list_empty(&ep->queue)) {
+                       else {
                                u32     s;
 
                                /* OUT FIFO might have packet(s) buffered */