summaryrefslogtreecommitdiffstats
path: root/net/phonet
diff options
context:
space:
mode:
authorXu Wang <vulab@iscas.ac.cn>2020-01-03 09:20:40 +0000
committerDavid S. Miller <davem@davemloft.net>2020-01-03 12:25:50 -0800
commit1f623431100138ffaaae36e122f2727c13de640a (patch)
treef6ed76a419cfe126320bebaaccf7bd6e6eafb908 /net/phonet
parentb39c78b2aa09cae05f3a48c11f67b3add0d604de (diff)
downloadlinux-1f623431100138ffaaae36e122f2727c13de640a.tar.bz2
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 <vulab@iscas.ac.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/phonet')
-rw-r--r--net/phonet/pn_dev.c2
1 files changed, 0 insertions, 2 deletions
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);
}