]> git.karo-electronics.de Git - linux-beck.git/commitdiff
netlink: simplify nfnetlink_bind
authorRichard Guy Briggs <rgb@redhat.com>
Wed, 23 Apr 2014 01:31:53 +0000 (21:31 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Apr 2014 01:42:26 +0000 (21:42 -0400)
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>
net/netfilter/nfnetlink.c

index e8138da4c14f70f40449c72ec4dc4d31f2960b8e..0df800a454ecb9e17769e4ebbcb540164fa44db0 100644 (file)
@@ -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