crypto: sha-mb - remove a bogus NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 22 Nov 2014 18:36:28 +0000 (21:36 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 25 Nov 2014 14:50:43 +0000 (22:50 +0800)
This can't be NULL and we dereferenced it earlier.  Smatch used to
ignore these things where the pointer was obviously non-NULL but I've
found that sometimes the intention was to check something else so we
were maybe missing bugs.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/sha-mb/sha1_mb.c

index 99eefd8..a225a5c 100644 (file)
@@ -204,8 +204,7 @@ static struct sha1_hash_ctx *sha1_ctx_mgr_resubmit(struct sha1_ctx_mgr *mgr, str
                        continue;
                }
 
-               if (ctx)
-                       ctx->status = HASH_CTX_STS_IDLE;
+               ctx->status = HASH_CTX_STS_IDLE;
                return ctx;
        }