netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netlink: silence compiler warning
@ 2009-09-05  0:55 Brian Haley
  2009-09-05  1:08 ` Marcel Holtmann
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Haley @ 2009-09-05  0:55 UTC (permalink / raw)
  To: David Miller; +Cc: netdev@vger.kernel.org

  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>
---

diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 575c643..66f6ba0 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -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');

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-09-05  8:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-05  0:55 [PATCH] netlink: silence compiler warning Brian Haley
2009-09-05  1:08 ` Marcel Holtmann
2009-09-05  1:36   ` Brian Haley
2009-09-05  3:33     ` David Miller
2009-09-05  7:52       ` Jarek Poplawski
2009-09-05  8:13         ` David Miller
2009-09-05  3:32   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).