Linux-Crypto Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] crypto: ccp: remove redundant assignment to variable ret
@ 2020-06-18 10:12 Colin King
  2020-06-18 13:51 ` Tom Lendacky
  2020-06-26  6:07 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2020-06-18 10:12 UTC (permalink / raw)
  To: Tom Lendacky, Herbert Xu, David S . Miller, linux-crypto
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable ret is being assigned with a value that is never read
and it is being updated later with a new value.  The assignment is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/crypto/ccp/ccp-ops.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c
index 422193690fd4..d270aa792888 100644
--- a/drivers/crypto/ccp/ccp-ops.c
+++ b/drivers/crypto/ccp/ccp-ops.c
@@ -1308,7 +1308,6 @@ ccp_run_des3_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
 			return -EINVAL;
 	}
 
-	ret = -EIO;
 	/* Zero out all the fields of the command desc */
 	memset(&op, 0, sizeof(op));
 
-- 
2.27.0.rc0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: ccp: remove redundant assignment to variable ret
  2020-06-18 10:12 [PATCH] crypto: ccp: remove redundant assignment to variable ret Colin King
@ 2020-06-18 13:51 ` Tom Lendacky
  2020-06-26  6:07 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Lendacky @ 2020-06-18 13:51 UTC (permalink / raw)
  To: Colin King, Herbert Xu, David S . Miller, linux-crypto
  Cc: kernel-janitors, linux-kernel

On 6/18/20 5:12 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable ret is being assigned with a value that is never read
> and it is being updated later with a new value.  The assignment is
> redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Tom Lendacky <thomas.lendacky@amd.com>

> ---
>   drivers/crypto/ccp/ccp-ops.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c
> index 422193690fd4..d270aa792888 100644
> --- a/drivers/crypto/ccp/ccp-ops.c
> +++ b/drivers/crypto/ccp/ccp-ops.c
> @@ -1308,7 +1308,6 @@ ccp_run_des3_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
>   			return -EINVAL;
>   	}
>   
> -	ret = -EIO;
>   	/* Zero out all the fields of the command desc */
>   	memset(&op, 0, sizeof(op));
>   
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: ccp: remove redundant assignment to variable ret
  2020-06-18 10:12 [PATCH] crypto: ccp: remove redundant assignment to variable ret Colin King
  2020-06-18 13:51 ` Tom Lendacky
@ 2020-06-26  6:07 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2020-06-26  6:07 UTC (permalink / raw)
  To: Colin King
  Cc: Tom Lendacky, David S . Miller, linux-crypto, kernel-janitors,
	linux-kernel

On Thu, Jun 18, 2020 at 11:12:29AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable ret is being assigned with a value that is never read
> and it is being updated later with a new value.  The assignment is
> redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/crypto/ccp/ccp-ops.c | 1 -
>  1 file changed, 1 deletion(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 10:12 [PATCH] crypto: ccp: remove redundant assignment to variable ret Colin King
2020-06-18 13:51 ` Tom Lendacky
2020-06-26  6:07 ` Herbert Xu

Linux-Crypto Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-crypto/0 linux-crypto/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-crypto linux-crypto/ https://lore.kernel.org/linux-crypto \
		linux-crypto@vger.kernel.org
	public-inbox-index linux-crypto

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-crypto


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git