mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
crypto: marvell/cesa - Avoid empty transfer descriptor
[ Upstream commit 1bafd82d9a40cf09c6c40f1c09cc35b7050b1a9f ]
The user may set req->src even if req->nbytes == 0. If there
is no data to hash from req->src, do not generate an empty TDMA
descriptor.
Fixes: db509a4533 ("crypto: marvell/cesa - add TDMA support")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
32d3e8049a
commit
8517d3af60
1 changed files with 1 additions and 1 deletions
|
|
@ -630,7 +630,7 @@ static int mv_cesa_ahash_dma_req_init(struct ahash_request *req)
|
|||
if (ret)
|
||||
goto err_free_tdma;
|
||||
|
||||
if (iter.src.sg) {
|
||||
if (iter.base.len > iter.src.op_offset) {
|
||||
/*
|
||||
* Add all the new data, inserting an operation block and
|
||||
* launch command between each full SRAM block-worth of
|
||||
|
|
|
|||
Loading…
Reference in a new issue