From: Steven Whitehouse <swhiteho@redhat.com>
Date: Tue, 28 Sep 2010 09:17:47 +0000 (+0100)
Subject: GFS2: Fix compiler warning from previous patch
X-Git-Tag: firefly_0821_release~7613^2~3743^2~6
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d594845106f34c079a6b05be01a37e4883c3bf4c;p=firefly-linux-kernel-4.4.55.git

GFS2: Fix compiler warning from previous patch

This shouldn't really be required, but gcc can't tell that
"al" is only accessed when initialised.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---

diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index 1bf178831ae8..6b24afb96aae 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -615,7 +615,7 @@ static int gfs2_write_begin(struct file *file, struct address_space *mapping,
 	unsigned int data_blocks = 0, ind_blocks = 0, rblocks;
 	int alloc_required;
 	int error = 0;
-	struct gfs2_alloc *al;
+	struct gfs2_alloc *al = NULL;
 	pgoff_t index = pos >> PAGE_CACHE_SHIFT;
 	unsigned from = pos & (PAGE_CACHE_SIZE - 1);
 	unsigned to = from + len;