* [PATCH] btrfs: fix the warning in prepare_pages
@ 2013-12-19 3:20 Anand Jain
0 siblings, 0 replies; only message in thread
From: Anand Jain @ 2013-12-19 3:20 UTC (permalink / raw)
To: linux-btrfs
would fix the below compile warning
fs/btrfs/file.c: In function ‘prepare_pages’:
fs/btrfs/file.c:1247: warning: ‘err’ may be used uninitialized in this function
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
fs/btrfs/file.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 740ae8c..35bf838 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++) {
--
1.7.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-19 3:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-19 3:20 [PATCH] btrfs: fix the warning in prepare_pages Anand Jain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).