The first argument to list_for_each_entry cannot be NULL. Generated by: scripts/coccinelle/iterators/itnull.cocci CC: Harsh Jain <harsh@xxxxxxxxxxx> Signed-off-by: Julia Lawall <julia.lawall@xxxxxxx> Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx> --- 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@xxxxxxxxxxx> 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; -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html