From: Herbert Xu Date: Thu, 22 May 2025 09:32:47 +0000 (+0800) Subject: crypto: marvell/cesa - Remove unnecessary state setting on final X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0e801fe7d8103049fb2da1646ccc47e8c6d32596;p=thirdparty%2Flinux.git crypto: marvell/cesa - Remove unnecessary state setting on final There is no point in setting the hash state after finalisation since the hash state must never be used again. Remove that code. Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/marvell/cesa/hash.c b/drivers/crypto/marvell/cesa/hash.c index 6815eddc90681..8b4a3f291926c 100644 --- a/drivers/crypto/marvell/cesa/hash.c +++ b/drivers/crypto/marvell/cesa/hash.c @@ -362,16 +362,13 @@ static void mv_cesa_ahash_complete(struct crypto_async_request *req) if (mv_cesa_req_get_type(&creq->base) == CESA_DMA_REQ && (creq->base.chain.last->flags & CESA_TDMA_TYPE_MSK) == CESA_TDMA_RESULT) { - __le32 *data = NULL; + const void *data; /* * Result is already in the correct endianness when the SA is * used */ data = creq->base.chain.last->op->ctx.hash.hash; - for (i = 0; i < digsize / 4; i++) - creq->state[i] = le32_to_cpu(data[i]); - memcpy(ahashreq->result, data, digsize); } else { for (i = 0; i < digsize / 4; i++)