]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
aoe: initialize sysminor to avoid compiler warning
authorEd Cashin <ecashin@coraid.com>
Tue, 18 Dec 2012 00:04:04 +0000 (16:04 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 18 Dec 2012 01:15:25 +0000 (17:15 -0800)
Because the minor_get and related functions use the return values for
errors, the compiler doesn't know that sysminor will always either 1) be
initialized in aoedev_by_aoeaddr by the call to minor_get, or 2) be
unused as the "goto out" is executed.

This patch avoids the compiler warning.

Signed-off-by: Ed Cashin <ecashin@coraid.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/aoe/aoedev.c

index 88ccd6d83c39b03c4e5b28e5bdb0fe81b03f047f..80b3d3ea10c3bc08a331381da70b855132015779 100644 (file)
@@ -383,7 +383,7 @@ aoedev_by_aoeaddr(ulong maj, int min, int do_alloc)
        struct aoedev *d;
        int i;
        ulong flags;
-       ulong sysminor;
+       ulong sysminor = 0;
 
        spin_lock_irqsave(&devlist_lock, flags);