Patchwork USB: UDC: net2280: Remove redundant "if" condition

login
register
mail settings
Submitter Alan Stern
Date April 15, 2019, 5:36 p.m.
Message ID <Pine.LNX.4.44L0.1904151335470.1575-100000@iolanthe.rowland.org>
Download mbox | patch
Permalink /patch/773541/
State New
Headers show

Comments

Alan Stern - April 15, 2019, 5:36 p.m.
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>

---


[as1888]


 drivers/usb/gadget/udc/net2280.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

Index: usb-devel/drivers/usb/gadget/udc/net2280.c
===================================================================
--- usb-devel.orig/drivers/usb/gadget/udc/net2280.c
+++ usb-devel/drivers/usb/gadget/udc/net2280.c
@@ -1057,7 +1057,7 @@  net2280_queue(struct usb_ep *_ep, struct
 			/* 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 */