From 1f623431100138ffaaae36e122f2727c13de640a Mon Sep 17 00:00:00 2001 From: Xu Wang Date: Fri, 3 Jan 2020 09:20:40 +0000 Subject: net: Remove redundant BUG_ON() check in phonet_pernet Passing NULL to phonet_pernet causes a crash via BUG_ON. Dereferencing net in net_generic() also has the same effect. This patch removes the redundant BUG_ON check on the same parameter. Signed-off-by: Xu Wang Signed-off-by: David S. Miller --- net/phonet/pn_dev.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'net/phonet') diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c index 49bd76a87461..ac0fae06cc15 100644 --- a/net/phonet/pn_dev.c +++ b/net/phonet/pn_dev.c @@ -35,8 +35,6 @@ static unsigned int phonet_net_id __read_mostly; static struct phonet_net *phonet_pernet(struct net *net) { - BUG_ON(!net); - return net_generic(net, phonet_net_id); } -- cgit v1.2.3