linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: caam/qi2: remove redundant assignment to ret
@ 2020-06-11 15:39 Colin King
  2020-06-18  7:58 ` Herbert Xu
  2020-06-18 10:54 ` Horia Geantă
  0 siblings, 2 replies; 9+ messages in thread
From: Colin King @ 2020-06-11 15:39 UTC (permalink / raw)
  To: Horia Geantă,
	Aymen Sghaier, 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 a value that is never read, the
error exit path via label 'unmap' returns -ENOMEM anyhow, so assigning
ret with -ENOMEM is redundamt.

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

diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
index 28669cbecf77..ef2c4e095db3 100644
--- a/drivers/crypto/caam/caamalg_qi2.c
+++ b/drivers/crypto/caam/caamalg_qi2.c
@@ -4044,7 +4044,6 @@ static int ahash_finup_no_ctx(struct ahash_request *req)
 					  DMA_TO_DEVICE);
 	if (dma_mapping_error(ctx->dev, edesc->qm_sg_dma)) {
 		dev_err(ctx->dev, "unable to map S/G table\n");
-		ret = -ENOMEM;
 		goto unmap;
 	}
 	edesc->qm_sg_bytes = qm_sg_bytes;
@@ -4055,7 +4054,6 @@ static int ahash_finup_no_ctx(struct ahash_request *req)
 	if (dma_mapping_error(ctx->dev, state->ctx_dma)) {
 		dev_err(ctx->dev, "unable to map ctx\n");
 		state->ctx_dma = 0;
-		ret = -ENOMEM;
 		goto unmap;
 	}
 
-- 
2.27.0.rc0


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

end of thread, other threads:[~2020-06-26  6:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 15:39 [PATCH] crypto: caam/qi2: remove redundant assignment to ret Colin King
2020-06-18  7:58 ` Herbert Xu
2020-06-18 10:40   ` Horia Geantă
2020-06-18 10:44     ` Herbert Xu
2020-06-18 10:54 ` Horia Geantă
2020-06-18 11:00   ` Herbert Xu
2020-06-18 13:16     ` Horia Geantă
2020-06-19 13:22       ` [PATCH] crypto: caam/qi2 - fix return code in ahash_finup_no_ctx() Horia Geantă
2020-06-26  6:08         ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).