diff options
author | ye xingchen <ye.xingchen@zte.com.cn> | 2022-09-20 08:32:52 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-09-30 07:57:50 +0200 |
commit | 6a40fb0d9db15f95b9ea884fbaedf8f82c51399f (patch) | |
tree | 31f6d01f3fefdbf08318b933a300137455f0dcf1 /drivers/crypto | |
parent | crypto: aspeed - Fix check for platform_get_irq() errors (diff) | |
download | linux-6a40fb0d9db15f95b9ea884fbaedf8f82c51399f.tar.xz linux-6a40fb0d9db15f95b9ea884fbaedf8f82c51399f.zip |
crypto: ccp - Remove the unneeded result variable
Return the value ccp_crypto_enqueue_request() directly instead of storing
it in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Acked-by: John Allen <john.allen@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/ccp/ccp-crypto-des3.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/crypto/ccp/ccp-crypto-des3.c b/drivers/crypto/ccp/ccp-crypto-des3.c index ec97daf0fcb7..278636ed251a 100644 --- a/drivers/crypto/ccp/ccp-crypto-des3.c +++ b/drivers/crypto/ccp/ccp-crypto-des3.c @@ -64,7 +64,6 @@ static int ccp_des3_crypt(struct skcipher_request *req, bool encrypt) struct ccp_des3_req_ctx *rctx = skcipher_request_ctx(req); struct scatterlist *iv_sg = NULL; unsigned int iv_len = 0; - int ret; if (!ctx->u.des3.key_len) return -EINVAL; @@ -100,9 +99,7 @@ static int ccp_des3_crypt(struct skcipher_request *req, bool encrypt) rctx->cmd.u.des3.src_len = req->cryptlen; rctx->cmd.u.des3.dst = req->dst; - ret = ccp_crypto_enqueue_request(&req->base, &rctx->cmd); - - return ret; + return ccp_crypto_enqueue_request(&req->base, &rctx->cmd); } static int ccp_des3_encrypt(struct skcipher_request *req) |