[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210217200254.196243-1-colin.king@canonical.com>
Date: Wed, 17 Feb 2021 20:02:54 +0000
From: Colin King <colin.king@...onical.com>
To: Kees Cook <keescook@...omium.org>,
Anton Vorontsov <anton@...msg.org>,
Colin Cross <ccross@...roid.com>,
Tony Luck <tony.luck@...el.com>
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] pstore: remove redundant initialization of variable zipped_len
From: Colin Ian King <colin.king@...onical.com>
The variable zipped_len 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. Clean up the code
and move the scope of zipped_len.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
fs/pstore/platform.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 32f64abc277c..e79bc527289d 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -410,7 +410,6 @@ static void pstore_dump(struct kmsg_dumper *dumper,
char *dst;
size_t dst_size;
int header_size;
- int zipped_len = -1;
size_t dump_size;
struct pstore_record record;
@@ -440,6 +439,8 @@ static void pstore_dump(struct kmsg_dumper *dumper,
break;
if (big_oops_buf) {
+ int zipped_len;
+
zipped_len = pstore_compress(dst, psinfo->buf,
header_size + dump_size,
psinfo->bufsize);
--
2.30.0
Powered by blists - more mailing lists