From: Julia Lawall <julia.lawall@lip6.fr>
To: Harsh Jain <harsh@chelsio.com>
Cc: hariprasad@chelsio.com, netdev@vger.kernel.org,
herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org,
Atul Gupta <atul.gupta@chelsio.com>,
kbuild-all@01.org
Subject: [PATCH] fix itnull.cocci warnings
Date: Sat, 7 Jan 2017 10:46:17 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1701071042410.2029@hadrien> (raw)
The first argument to list_for_each_entry cannot be NULL.
Generated by: scripts/coccinelle/iterators/itnull.cocci
CC: Harsh Jain <harsh@chelsio.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
This code comes from the following git tree:
url:
https://github.com/0day-ci/linux/commits/Harsh-Jain/crypto-chcr-Bug-fixes/20170107-093356
base:
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
master
In-Reply-To:
<8e0086b56d8fb61637d179c32a09a1bca03c4186.1483599449.git.harsh@chelsio.com>
chcr_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/crypto/chelsio/chcr_core.c
+++ b/drivers/crypto/chelsio/chcr_core.c
@@ -61,7 +61,7 @@ int assign_chcr_device(struct chcr_dev *
*/
mutex_lock(&dev_mutex); /* TODO ? */
list_for_each_entry(u_ctx, &uld_ctx_list, entry)
- if (u_ctx && u_ctx->dev) {
+ if (u_ctx->dev) {
*dev = u_ctx->dev;
ret = 0;
break;
next reply other threads:[~2017-01-07 9:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-07 9:46 Julia Lawall [this message]
2017-01-12 16:26 ` [PATCH] fix itnull.cocci warnings Herbert Xu
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.20.1701071042410.2029@hadrien \
--to=julia.lawall@lip6.fr \
--cc=atul.gupta@chelsio.com \
--cc=hariprasad@chelsio.com \
--cc=harsh@chelsio.com \
--cc=herbert@gondor.apana.org.au \
--cc=kbuild-all@01.org \
--cc=linux-crypto@vger.kernel.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).