drivers/crypto/cpp: remove redundant ret variable
Subsystems (2)
PATCH 1/1 drivers/crypto/cpp: remove redundant ret variable
From: Minghao Chi <[email protected]>
Return value from ccp_crypto_enqueue_request() directly instead of taking this in another redundant variable.
Reported-by Zeal Robot <[email protected]>
Signed-off-by Minghao Chi <[email protected]>
Signed-off-by CGEL ZTE <[email protected]>
--- drivers/crypto/ccp/ccp-crypto-aes.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/crypto/ccp/ccp-crypto-aes.c +1 -4
@@ -69,7 +69,6 @@ static int ccp_aes_crypt(struct skcipher_request *req, bool encrypt)struct ccp_aes_req_ctx *rctx =skcipher_request_ctx (req);struct scatterlist *iv_sg =NULL ;unsigned int iv_len =0 ; -int ret;if (!ctx->u.aes.key_len)return -EINVAL ;
@@ -104,9 +103,7 @@ static int ccp_aes_crypt(struct skcipher_request *req, bool encrypt) rctx->cmd.u.aes.src_len = req->cryptlen; rctx->cmd.u.aes.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_aes_encrypt (struct skcipher_request *req)
Signature · 1 line
2.25.1
Herbert Xu
maintainerQuoted 11 lines · On Wed, Jan 12, 2022 at 08:05:44AM +0000, [email protected] wrote:
From: Minghao Chi <[email protected]>
Return value from
ccp_crypto_enqueue_request()directly instead of taking this in another redundant variable.Reported-by Zeal Robot <[email protected]>Signed-off-by Minghao Chi <[email protected]>Signed-off-by CGEL ZTE <[email protected]>--- drivers/crypto/ccp/ccp-crypto-aes.c | 5 +---- 1 file changed, 1 insertion(+), 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