Skip to content

Commit

Permalink
crypto: marvell/cesa - remove unneeded condition
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Herbert Xu committed Apr 5, 2016
1 parent 06af9b0 commit 063327f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/crypto/marvell/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 063327f

Please sign in to comment.