netlink: silence compiler warning
authorBrian Haley <brian.haley@hp.com>
Sat, 5 Sep 2009 03:36:52 +0000 (20:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 5 Sep 2009 03:36:52 +0000 (20:36 -0700)
  CC      net/netlink/genetlink.o
net/netlink/genetlink.c: In function ‘genl_register_mc_group’:
net/netlink/genetlink.c:139: warning: ‘err’ may be used uninitialized in this function

From following the code 'err' is initialized, but set it to zero to
silence the warning.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/genetlink.c

index 575c64341508eb12119eb120349de4704525648a..66f6ba0bab11932c9b1302a555f9bcefb52065dd 100644 (file)
@@ -136,7 +136,7 @@ int genl_register_mc_group(struct genl_family *family,
 {
        int id;
        unsigned long *new_groups;
-       int err;
+       int err = 0;
 
        BUG_ON(grp->name[0] == '\0');