summaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorLionel Debieve <lionel.debieve@st.com>2017-11-06 23:41:52 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2017-11-10 12:20:23 +0100
commit63c53823f00f0ffd13e8c86b05c1486614a2df85 (patch)
tree35782229dc1b9c215f7c75d1802276fcc8f88f31 /drivers/crypto
parentcrypto: dh - Remove pointless checks for NULL 'p' and 'g' (diff)
downloadlinux-63c53823f00f0ffd13e8c86b05c1486614a2df85.tar.xz
linux-63c53823f00f0ffd13e8c86b05c1486614a2df85.zip
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: Lionel Debieve <lionel.debieve@st.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/stm32/stm32-hash.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c
index fd13838fcff2..764dbf362879 100644
--- a/drivers/crypto/stm32/stm32-hash.c
+++ b/drivers/crypto/stm32/stm32-hash.c
@@ -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)