Skip to content

Commit bfe4bc7

Browse files
rgbriggsdavem330
authored andcommitted
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>
1 parent 4cd3675 commit bfe4bc7

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎net/netfilter/nfnetlink.c‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -407,12 +407,9 @@ static void nfnetlink_bind(int group)
407407

408408
rcu_read_lock();
409409
ss = nfnetlink_get_subsys(type);
410-
if (!ss) {
411-
rcu_read_unlock();
412-
request_module("nfnetlink-subsys-%d", type);
413-
return;
414-
}
415410
rcu_read_unlock();
411+
if (!ss)
412+
request_module("nfnetlink-subsys-%d", type);
416413
}
417414
#endif
418415

0 commit comments

Comments
 (0)