[PATCH] gfs2: uninitialized variable in __gfs2_iomap_get()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux