summaryrefslogtreecommitdiff
path: root/drivers/crypto/marvell
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-03-21 12:03:43 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2016-04-05 20:35:45 +0800
commit063327f54e864874de3f4d6715ff284e8d135e12 (patch)
treed298d28b1b4365815948a1c10214ba2f8310f02f /drivers/crypto/marvell
parent06af9b0f4949b85b20107e6d75f5eba15111d220 (diff)
downloadlinux-next-063327f54e864874de3f4d6715ff284e8d135e12.tar.gz
crypto: marvell/cesa - remove unneeded condition
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>
Diffstat (limited to 'drivers/crypto/marvell')
-rw-r--r--drivers/crypto/marvell/hash.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c
index 7ca2e0f9dc2e..7a5058da9151 100644
--- a/drivers/crypto/marvell/hash.c
+++ b/drivers/crypto/marvell/hash.c
@@ -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;
}