pstore: remove redundant initialization of variable zipped_len
Subsystems (2)
PATCH 1/1 pstore: remove redundant initialization of variable zipped_len
From: Colin Ian King <[email protected]>
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 <[email protected]>
--- fs/pstore/platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/pstore/platform.c +2 -1
@@ -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);
Signature · 1 line
2.30.0