[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221110143423.3250790-1-senozhatsky@chromium.org>
Date: Thu, 10 Nov 2022 23:34:23 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Minchan Kim <minchan@...nel.org>, Nitin Gupta <ngupta@...are.org>,
Suleiman Souhlal <suleiman@...gle.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
llvm@...ts.linux.dev,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Nathan Chancellor <nathan@...nel.org>
Subject: [PATCH] zram: we should always zero out err variable in recompress loop
Reported-by: Nathan Chancellor <nathan@...nel.org>
Signed-off-by: Sergey Senozhatsky <senozhatsky@...omium.org>
---
drivers/block/zram/zram_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 171eccc2249d..9d33801e8ba8 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1891,7 +1891,7 @@ static ssize_t recompress_store(struct device *dev,
ret = len;
for (index = 0; index < nr_pages; index++) {
- int err;
+ int err = 0;
zram_slot_lock(zram, index);
--
2.38.1.431.g37b22c650d-goog
Powered by blists - more mailing lists