]> err.no Git - linux-2.6/commitdiff
ext2: fix return of uninitialised variable
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 27 Jun 2007 21:10:08 +0000 (14:10 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 28 Jun 2007 18:38:29 +0000 (11:38 -0700)
gcc correctly says

fs/ext2/super.c: In function 'ext2_remount':
fs/ext2/super.c:1055: warning: 'err' may be used uninitialized in this function

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ext2/super.c

index c9fd8cf6eaa9b6b4c3016fb375616d2bcbd5303a..5de5061eb331c811c9ed0c9baab5f75655c7ae99 100644 (file)
@@ -1043,6 +1043,7 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data)
 
        if ((ext2_use_xip(sb)) && (sb->s_blocksize != PAGE_SIZE)) {
                printk("XIP: Unsupported blocksize\n");
+               err = -EINVAL;
                goto restore_opts;
        }