crypto: ccp - Remove the unneeded result variable
authorye xingchen <ye.xingchen@zte.com.cn>
Tue, 20 Sep 2022 06:32:52 +0000 (06:32 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Sep 2022 05:57:50 +0000 (13:57 +0800)
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>
drivers/crypto/ccp/ccp-crypto-des3.c

index ec97daf0fcb7cde5b959997edf480b377e71fd17..278636ed251a5349c57faec8af89ff6048dfcf3d 100644 (file)
@@ -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)