Skip to content

Commit

Permalink
aoe: initialize sysminor to avoid compiler warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ed Cashin authored and Linus Torvalds committed Dec 18, 2012
1 parent e0b2bba commit 10935d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/aoe/aoedev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 10935d0

Please sign in to comment.