crypto: marvell/cesa - remove unneeded condition
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 21 Mar 2016 09:03:43 +0000 (12:03 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 5 Apr 2016 12:35:45 +0000 (20:35 +0800)
creq->cache[] is an array inside the struct, it's not a pointer and it
can't be NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/marvell/hash.c

index 7ca2e0f..7a5058d 100644 (file)
@@ -768,8 +768,7 @@ static int mv_cesa_ahash_export(struct ahash_request *req, void *hash,
        *len = creq->len;
        memcpy(hash, creq->state, digsize);
        memset(cache, 0, blocksize);
-       if (creq->cache)
-               memcpy(cache, creq->cache, creq->cache_ptr);
+       memcpy(cache, creq->cache, creq->cache_ptr);
 
        return 0;
 }