summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/netlink/genetlink.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 91566ed36c43..2e11061ef885 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -985,8 +985,7 @@ static struct genl_multicast_group genl_ctrl_groups[] = {
static int genl_bind(struct net *net, int group)
{
- int i, err;
- bool found = false;
+ int i, err = 0;
down_read(&cb_lock);
for (i = 0; i < GENL_FAM_TAB_SIZE; i++) {
@@ -1003,16 +1002,12 @@ static int genl_bind(struct net *net, int group)
err = f->mcast_bind(net, fam_grp);
else
err = 0;
- found = true;
break;
}
}
}
up_read(&cb_lock);
- if (WARN_ON(!found))
- err = 0;
-
return err;
}