From: Dan Carpenter Date: Mon, 21 Mar 2016 09:03:43 +0000 (+0300) Subject: crypto: marvell/cesa - remove unneeded condition X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=063327f54e864874de3f4d6715ff284e8d135e12;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Boris Brezillon Signed-off-by: Herbert Xu --- 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; }