From: Julia Lawall <julia.lawall@lip6.fr>
To: Geliang Tang <geliangtang@163.com>
Cc: Felipe Balbi <balbi@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andrzej Pietrasiewicz <andrzej.p@samsung.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
kbuild-all@01.org
Subject: [PATCH] usb: gadget: rndis: fix itnull.cocci warnings
Date: Fri, 18 Dec 2015 21:07:51 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.02.1512182106320.2075@localhost6.localdomain6> (raw)
The index variable of list_for_each_entry_safe is never NULL.
Generated by: scripts/coccinelle/iterators/itnull.cocci
CC: Geliang Tang <geliangtang@163.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.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);
}
next reply other threads:[~2015-12-18 20:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-18 20:07 Julia Lawall [this message]
2015-12-22 18:10 ` Felipe Balbi
2015-12-22 18:17 ` Julia Lawall
2015-12-22 18:28 ` Felipe Balbi
2016-01-25 15:21 Julia Lawall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.02.1512182106320.2075@localhost6.localdomain6 \
--to=julia.lawall@lip6.fr \
--cc=andrzej.p@samsung.com \
--cc=balbi@ti.com \
--cc=geliangtang@163.com \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®