]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
crypto: marvell/cesa - Remove unnecessary state setting on final
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 22 May 2025 09:32:47 +0000 (17:32 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 13 Jun 2025 09:26:16 +0000 (17:26 +0800)
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 <herbert@gondor.apana.org.au>
drivers/crypto/marvell/cesa/hash.c

index 6815eddc9068124a6249391d7325ef51ed6c60d9..8b4a3f291926cc9a3ee16d2ad3edc7578e6afa16 100644 (file)
@@ -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++)