linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] partitions/ldm: remove redundant assignment to variable r_index
@ 2021-04-15 13:05 Colin King
  0 siblings, 0 replies; only message in thread
From: Colin King @ 2021-04-15 13:05 UTC (permalink / raw)
  To: Richard Russon, Jens Axboe, linux-ntfs-dev, linux-block
  Cc: kernel-janitors, linux-kernel

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

The variable r_index is being assigned a value that is never read,
the assignment is redundant and can be removed.

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

diff --git a/block/partitions/ldm.c b/block/partitions/ldm.c
index d333786b5c7e..b40c0ac9022c 100644
--- a/block/partitions/ldm.c
+++ b/block/partitions/ldm.c
@@ -964,7 +964,6 @@ static bool ldm_parse_prt3(const u8 *buffer, int buflen, struct vblk *vb)
 		}
 		len = r_index;
 	} else {
-		r_index = 0;
 		len = r_diskid;
 	}
 	if (len < 0) {
-- 
2.30.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-15 13:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15 13:05 [PATCH] partitions/ldm: remove redundant assignment to variable r_index Colin King

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).