aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nfnetlink.c
diff options
context:
space:
mode:
authorRichard Guy Briggs <rgb@redhat.com>2014-04-22 21:31:53 -0400
committerDavid S. Miller <davem@davemloft.net>2014-04-22 21:42:26 -0400
commitbfe4bc71c64a34813a7bde0ad4d28486679ac3fe (patch)
tree92e41b1ba89c3ae61cb9c11a56eef6cb36832bbb /net/netfilter/nfnetlink.c
parent4cd3675ebf74d7f559038ded6aa8088e4099a83d (diff)
downloadlinux-bfe4bc71c64a34813a7bde0ad4d28486679ac3fe.tar.gz
netlink: simplify nfnetlink_bind
Remove duplicity and simplify code flow by moving the rcu_read_unlock() above the condition and let the flow control exit naturally at the end of the function. Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/nfnetlink.c')
-rw-r--r--net/netfilter/nfnetlink.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index e8138da4c14f7..0df800a454ecb 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -407,12 +407,9 @@ static void nfnetlink_bind(int group)
rcu_read_lock();
ss = nfnetlink_get_subsys(type);
- if (!ss) {
- rcu_read_unlock();
- request_module("nfnetlink-subsys-%d", type);
- return;
- }
rcu_read_unlock();
+ if (!ss)
+ request_module("nfnetlink-subsys-%d", type);
}
#endif