Selaa lähdekoodia

crypto: sha-mb - remove a bogus NULL check

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>
Dan Carpenter 10 vuotta sitten
vanhempi
commit
5d1b3c98ec
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  1. 1 2
      arch/x86/crypto/sha-mb/sha1_mb.c

+ 1 - 2
arch/x86/crypto/sha-mb/sha1_mb.c

@@ -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;
 	}