[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200428063126.25952-1-yanaijie@huawei.com>
Date: Tue, 28 Apr 2020 14:31:26 +0800
From: Jason Yan <yanaijie@...wei.com>
To: <balbi@...nel.org>, <gregkh@...uxfoundation.org>,
<gustavo@...eddedor.com>, <yanaijie@...wei.com>,
<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] usb: gadget: udc: s3c2410_udc: remove NULL check in s3c2410_udc_nuke()
No need to check the address of queue which is a member of struct
s3c2410_ep.
struct s3c2410_ep {
struct list_head queue;
......
};
This fixes a coccicheck warning:
drivers/usb/gadget/udc/s3c2410_udc.c:255:1-3: ERROR: test of a
variable/field address
Signed-off-by: Jason Yan <yanaijie@...wei.com>
---
drivers/usb/gadget/udc/s3c2410_udc.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/usb/gadget/udc/s3c2410_udc.c b/drivers/usb/gadget/udc/s3c2410_udc.c
index 0507a2ca0f55..80002d97b59d 100644
--- a/drivers/usb/gadget/udc/s3c2410_udc.c
+++ b/drivers/usb/gadget/udc/s3c2410_udc.c
@@ -251,10 +251,6 @@ static void s3c2410_udc_done(struct s3c2410_ep *ep,
static void s3c2410_udc_nuke(struct s3c2410_udc *udc,
struct s3c2410_ep *ep, int status)
{
- /* Sanity check */
- if (&ep->queue == NULL)
- return;
-
while (!list_empty(&ep->queue)) {
struct s3c2410_request *req;
req = list_entry(ep->queue.next, struct s3c2410_request,
--
2.21.1
Powered by blists - more mailing lists