* [PATCH] usb: gadget: udc: s3c2410_udc: remove NULL check in s3c2410_udc_nuke()
@ 2020-04-28 6:31 Jason Yan
0 siblings, 0 replies; only message in thread
From: Jason Yan @ 2020-04-28 6:31 UTC (permalink / raw)
To: balbi, gregkh, gustavo, yanaijie, linux-usb, linux-kernel
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@huawei.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-28 6:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 6:31 [PATCH] usb: gadget: udc: s3c2410_udc: remove NULL check in s3c2410_udc_nuke() Jason Yan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.