From: Filipe David Borba Manana Date: Fri, 13 Dec 2013 19:39:34 +0000 (+0000) Subject: Btrfs: fix use of uninitialized err variable X-Git-Tag: firefly_0821_release~176^2~3883^2~246 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fc28b62d648dde3cfbec6584c0fa19ea7350e7e9;p=firefly-linux-kernel-4.4.55.git Btrfs: fix use of uninitialized err variable fs/btrfs/file.c: In function ‘prepare_pages.isra.18’: fs/btrfs/file.c:1265:6: warning: ‘err’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Filipe David Borba Manana Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 740ae8c71701..35bf83876f3f 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1244,7 +1244,7 @@ static noinline int prepare_pages(struct inode *inode, struct page **pages, int i; unsigned long index = pos >> PAGE_CACHE_SHIFT; gfp_t mask = btrfs_alloc_write_mask(inode->i_mapping); - int err; + int err = 0; int faili; for (i = 0; i < num_pages; i++) {