Message ID | 20200618101229.11772-1-colin.king@canonical.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
Series | crypto: ccp: remove redundant assignment to variable ret | expand |
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)); > >
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.
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));