crypto: qce - drop redundant variable in qce_skcipher_done
Subsystems (3)
PATCH 1/1 crypto: qce - drop redundant variable in qce_skcipher_done
Remove the local ret variable and return the result directly.
Signed-off-by Thorsten Blum <[email protected]>
--- drivers/crypto/qce/skcipher.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/crypto/qce/skcipher.c +2 -4
@@ -261,7 +261,6 @@ static int qce_skcipher_crypt(struct skcipher_request *req, int encrypt)struct qce_alg_template *tmpl =to_cipher_tmpl (tfm);unsigned int blocksize =crypto_skcipher_blocksize (tfm);int keylen; -int ret; rctx->flags = tmpl->alg_flags; rctx->flags |= encrypt ?QCE_ENCRYPT :QCE_DECRYPT ;
@@ -299,9 +298,8 @@ static int qce_skcipher_crypt(struct skcipher_request *req, int encrypt) req->base.data);skcipher_request_set_crypt (&rctx->fallback_req, req->src, req->dst, req->cryptlen, req->iv); - ret = encrypt ?crypto_skcipher_encrypt (&rctx->fallback_req) : -crypto_skcipher_decrypt (&rctx->fallback_req); -return ret; +return encrypt ?crypto_skcipher_encrypt (&rctx->fallback_req) : +crypto_skcipher_decrypt (&rctx->fallback_req); }return tmpl->qce->async_req_enqueue (tmpl->qce, &req->base);
Quoted 4 lines · Thorsten Blum
Remove the local ret variable and return the result directly.
Signed-off-by Thorsten Blum <[email protected]>---
Reviewed-by Bartosz Golaszewski <[email protected]>
Herbert Xu
maintainerQuoted 6 lines · Thorsten Blum
Remove the local ret variable and return the result directly.
Signed-off-by Thorsten Blum <[email protected]>--- drivers/crypto/qce/skcipher.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt