lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e1d26e37-84d9-d746-7bfe-4d57eafa7056@amd.com>
Date:   Tue, 20 Sep 2022 14:09:08 -0500
From:   John Allen <john.allen@....com>
To:     cgel.zte@...il.com, herbert@...dor.apana.org.au
Cc:     thomas.lendacky@....com, davem@...emloft.net,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        ye xingchen <ye.xingchen@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH linux-next] crypto: ccp: Remove the unneeded result
 variable

On 9/20/22 1:32 AM, cgel.zte@...il.com wrote:
> From: ye xingchen <ye.xingchen@....com.cn>
> 
> Return the value ccp_crypto_enqueue_request() directly instead of storing
> it in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
> ---
>  drivers/crypto/ccp/ccp-crypto-des3.c | 5 +----
>  1 file changed, 1 insertion(+), 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)

Acked-by: John Allen <john.allen@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ