All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][next] block: blk-crypto-fallback: remove redundant initialization of variable err
@ 2020-05-26 22:49 ` Colin King
  0 siblings, 0 replies; 7+ messages in thread
From: Colin King @ 2020-05-26 22:49 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: kernel-janitors, linux-kernel

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

The variable err is being initialized with a value that is never read
and it is being updated later with a new value.  The initialization is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 block/blk-crypto-fallback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-crypto-fallback.c b/block/blk-crypto-fallback.c
index 74ab137ae3ba..6e49688a2d80 100644
--- a/block/blk-crypto-fallback.c
+++ b/block/blk-crypto-fallback.c
@@ -529,7 +529,7 @@ static bool blk_crypto_fallback_inited;
 static int blk_crypto_fallback_init(void)
 {
 	int i;
-	int err = -ENOMEM;
+	int err;
 
 	if (blk_crypto_fallback_inited)
 		return 0;
-- 
2.25.1

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

end of thread, other threads:[~2020-05-27 11:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-26 22:49 [PATCH][next] block: blk-crypto-fallback: remove redundant initialization of variable err Colin King
2020-05-26 22:49 ` Colin King
2020-05-26 23:20 ` Eric Biggers
2020-05-26 23:20   ` Eric Biggers
2020-05-26 23:27 ` [PATCH][next] block: blk-crypto-fallback: remove redundant initialization of variable err' Satya Tangirala
2020-05-27 11:42 ` [PATCH][next] block: blk-crypto-fallback: remove redundant initialization of variable err Jens Axboe
2020-05-27 11:42   ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.