From: Alan Stern Date: Mon, 15 Apr 2019 17:36:58 +0000 (-0400) Subject: USB: UDC: net2280: Remove redundant "if" condition X-Git-Tag: v5.15~6430^2^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6574abe69946589bf0f69cf9b32f6a2c71ae764f;p=platform%2Fkernel%2Flinux-starfive.git USB: UDC: net2280: Remove redundant "if" condition 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 Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c index 898339e5..b17473a 100644 --- a/drivers/usb/gadget/udc/net2280.c +++ b/drivers/usb/gadget/udc/net2280.c @@ -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 */