[PATCH 2/3] crypto: marvell/cesa - Fix padding cleanup on hash setup errors
From: Haoxiang Li
Date: Wed Nov 18 2026 - 02:57:09 EST
The hash DMA initialization error path clears the TDMA chain before
calling mv_cesa_ahash_last_cleanup(). The empty chain makes the request
appear to be a non-DMA request, so padding is not released. This also
happens if the first TDMA descriptor allocation fails after padding has
been allocated.
Call the DMA-specific padding cleanup helper directly, since this is
already known to be the DMA initialization path.
Fixes: 53da740fed30 ("crypto: marvell - Move tdma chain out of mv_cesa_tdma_req and remove it")
Signed-off-by: Haoxiang Li <haoxiang_li2024@xxxxxxx>
---
drivers/crypto/marvell/cesa/hash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/marvell/cesa/hash.c b/drivers/crypto/marvell/cesa/hash.c
index 35f5937b2f8b..f698d3df535b 100644
--- a/drivers/crypto/marvell/cesa/hash.c
+++ b/drivers/crypto/marvell/cesa/hash.c
@@ -751,7 +751,7 @@ static int mv_cesa_ahash_dma_req_init(struct ahash_request *req)
mv_cesa_ahash_dma_cleanup(req);
err:
- mv_cesa_ahash_last_cleanup(req);
+ mv_cesa_ahash_dma_last_cleanup(req);
return ret;
}
--
2.25.1