Commit ee3bd84f authored by Harsh Jain's avatar Harsh Jain Committed by Herbert Xu

crypto: chcr - fix itnull.cocci warnings

The first argument to list_for_each_entry cannot be NULL.

Generated by: scripts/coccinelle/iterators/itnull.cocci
Signed-off-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarHarsh Jain <harsh@chelsio.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 8a13449f
...@@ -61,7 +61,7 @@ int assign_chcr_device(struct chcr_dev **dev) ...@@ -61,7 +61,7 @@ int assign_chcr_device(struct chcr_dev **dev)
*/ */
mutex_lock(&dev_mutex); /* TODO ? */ mutex_lock(&dev_mutex); /* TODO ? */
list_for_each_entry(u_ctx, &uld_ctx_list, entry) list_for_each_entry(u_ctx, &uld_ctx_list, entry)
if (u_ctx && u_ctx->dev) { if (u_ctx->dev) {
*dev = u_ctx->dev; *dev = u_ctx->dev;
ret = 0; ret = 0;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment