[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <0b9cb1ea-4656-4802-b7a7-811c1e9e118a@moroto.mountain>
Date: Wed, 25 Oct 2023 14:57:10 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Andreas Gruenbacher <agruenba@...hat.com>
Cc: Bob Peterson <rpeterso@...hat.com>, gfs2@...ts.linux.dev,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH] gfs2: uninitialized variable in __gfs2_iomap_get()
The "ret" variable is uninitialized when we goto out because
gfs2_is_stuffed(ip).
Fixes: 2cd225820b91 ("gfs2: Initialize metapaths outside of __gfs2_iomap_get")
Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
---
fs/gfs2/bmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index cef57d87c24d..12d7651e15e9 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -866,7 +866,7 @@ static int __gfs2_iomap_get(struct inode *inode, loff_t pos, loff_t length,
__be64 *ptr;
sector_t lblock;
sector_t lblock_stop;
- int ret;
+ int ret = 0;
int eob;
u64 len;
struct buffer_head *bh;
--
2.42.0
Powered by blists - more mailing lists