From: akpm@linux-foundation.org Date: Fri, 8 Jun 2007 23:42:14 +0000 (-0700) Subject: [GFS2] gfs2_lookupi() uninitialised var fix X-Git-Tag: v2.6.23-rc1~1156^2~21 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=037bcbb7564e35aef937c54799550cd27735aac6;p=linux-2.6 [GFS2] gfs2_lookupi() uninitialised var fix fs/gfs2/inode.c: In function 'gfs2_lookupi': fs/gfs2/inode.c:392: warning: 'error' may be used uninitialized in this function Looks like a real bug to me. Cc: Steven Whitehouse Signed-off-by: Andrew Morton Signed-off-by: Steven Whitehouse --- diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index cacdb0dfe5..366235d6a5 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -389,7 +389,7 @@ struct inode *gfs2_lookupi(struct inode *dir, const struct qstr *name, struct super_block *sb = dir->i_sb; struct gfs2_inode *dip = GFS2_I(dir); struct gfs2_holder d_gh; - int error; + int error = 0; struct inode *inode = NULL; int unlock = 0;