diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-11-23 12:01:50 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-11-28 23:24:07 (GMT) |
commit | 0f0e2159c0c101426b705d70f43b9f423d51c869 (patch) | |
tree | 3f34c4510c93017c34e9b6b02975a6c4a17b7c2b /net | |
parent | a2f4dfba9e736ebe339d560cb92678280b1eb5db (diff) | |
download | linux-0f0e2159c0c101426b705d70f43b9f423d51c869.tar.xz |
genetlink: Fix uninitialized variable in genl_validate_assign_mc_groups()
net/netlink/genetlink.c: In function ‘genl_validate_assign_mc_groups’:
net/netlink/genetlink.c:217: warning: ‘err’ may be used uninitialized in this
function
Commit 2a94fe48f32ccf7321450a2cc07f2b724a444e5b ("genetlink: make multicast
groups const, prevent abuse") split genl_register_mc_group() in multiple
functions, but dropped the initialization of err.
Initialize err to zero to fix this.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netlink/genetlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index 4518a57..803206e 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c @@ -214,7 +214,7 @@ static int genl_validate_assign_mc_groups(struct genl_family *family) { int first_id; int n_groups = family->n_mcgrps; - int err, i; + int err = 0, i; bool groups_allocated = false; if (!n_groups) |