[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1512182106320.2075@localhost6.localdomain6>
Date: Fri, 18 Dec 2015 21:07:51 +0100 (CET)
From: Julia Lawall <julia.lawall@...6.fr>
To: Geliang Tang <geliangtang@....com>
cc: Felipe Balbi <balbi@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andrzej Pietrasiewicz <andrzej.p@...sung.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
kbuild-all@...org
Subject: [PATCH] usb: gadget: rndis: fix itnull.cocci warnings
The index variable of list_for_each_entry_safe is never NULL.
Generated by: scripts/coccinelle/iterators/itnull.cocci
CC: Geliang Tang <geliangtang@....com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...6.fr>
---
rndis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/usb/gadget/function/rndis.c
+++ b/drivers/usb/gadget/function/rndis.c
@@ -1009,7 +1009,7 @@ void rndis_free_response(struct rndis_pa
rndis_resp_t *r, *n;
list_for_each_entry_safe(r, n, ¶ms->resp_queue, list) {
- if (r && r->buf == buf) {
+ if (r->buf == buf) {
list_del(&r->list);
kfree(r);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists