Commit 63c53823 authored by Lionel Debieve's avatar Lionel Debieve Committed by Herbert Xu

crypto: stm32/hash - Fix return issue on update

When data append reached the threshold for processing,
we must inform that processing is on going to wait before
managing the next request.
Signed-off-by: default avatarLionel Debieve <lionel.debieve@st.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent ced6a586
......@@ -892,7 +892,6 @@ static int stm32_hash_enqueue(struct ahash_request *req, unsigned int op)
static int stm32_hash_update(struct ahash_request *req)
{
struct stm32_hash_request_ctx *rctx = ahash_request_ctx(req);
int ret;
if (!req->nbytes || !(rctx->flags & HASH_FLAGS_CPU))
return 0;
......@@ -906,12 +905,7 @@ static int stm32_hash_update(struct ahash_request *req)
return 0;
}
ret = stm32_hash_enqueue(req, HASH_OP_UPDATE);
if (rctx->flags & HASH_FLAGS_FINUP)
return ret;
return 0;
return stm32_hash_enqueue(req, HASH_OP_UPDATE);
}
static int stm32_hash_final(struct ahash_request *req)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment