linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Harsh Jain <harsh@chelsio.com>
To: hariprasad@chelsio.com, netdev@vger.kernel.org,
	herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org
Cc: Harsh Jain <harsh@chelsio.com>,
	Julia Lawall <julia.lawall@lip6.fr>,
	Fengguang Wu <fengguang.wu@intel.com>
Subject: [PATCH v1 4/4] crypto:chcr-fix itnull.cocci warnings
Date: Fri, 13 Jan 2017 17:59:23 +0530	[thread overview]
Message-ID: <58b705ab75691e7a9f292ad54becc15148a2cb41.1484309966.git.harsh@chelsio.com> (raw)
In-Reply-To: <cover.1484309965.git.harsh@chelsio.com>
In-Reply-To: <cover.1484309965.git.harsh@chelsio.com>

The first argument to list_for_each_entry cannot be NULL.

Generated by: scripts/coccinelle/iterators/itnull.cocci

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Harsh Jain <harsh@chelsio.com>
---
 drivers/crypto/chelsio/chcr_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/chelsio/chcr_core.c b/drivers/crypto/chelsio/chcr_core.c
index 1c65f07..2bfd61a 100644
--- 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 **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;
-- 
1.8.2.3

  parent reply	other threads:[~2017-01-13 12:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 12:29 [PATCH v1 0/4]crypto:chcr- Bug Fixes for 4.10 Harsh Jain
2017-01-13 12:29 ` [PATCH v1 1/4] crypto:chcr-Change flow IDs Harsh Jain
2017-01-13 12:29 ` [PATCH v1 2/4] crypto:chcr- Fix panic on dma_unmap_sg Harsh Jain
2017-01-13 12:29 ` [PATCH v1 3/4] crypto:chcr- Check device is allocated before use Harsh Jain
2017-01-13 12:29 ` Harsh Jain [this message]
2017-01-23 13:39 ` [PATCH v1 0/4]crypto:chcr- Bug Fixes for 4.10 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=58b705ab75691e7a9f292ad54becc15148a2cb41.1484309966.git.harsh@chelsio.com \
    --to=harsh@chelsio.com \
    --cc=fengguang.wu@intel.com \
    --cc=hariprasad@chelsio.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=julia.lawall@lip6.fr \
    --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).