summaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp/ppp_generic.c
diff options
context:
space:
mode:
authorXu Wang <vulab@iscas.ac.cn>2019-12-24 10:37:04 +0100
committerDavid S. Miller <davem@davemloft.net>2019-12-28 01:30:52 +0100
commit8a3f44a0bb76c4e69dea3ad398ada41ae4ffc3ea (patch)
tree744ec5da59f3298bf25b46245e42ea4e92b81133 /drivers/net/ppp/ppp_generic.c
parentMerge branch 'tcp_cubic-various-fixes' (diff)
downloadlinux-8a3f44a0bb76c4e69dea3ad398ada41ae4ffc3ea.tar.xz
linux-8a3f44a0bb76c4e69dea3ad398ada41ae4ffc3ea.zip
ppp: Remove redundant BUG_ON() check in ppp_pernet
Passing NULL to ppp_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 'drivers/net/ppp/ppp_generic.c')
-rw-r--r--drivers/net/ppp/ppp_generic.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 3bf8a8b42983..22cc2cb9d878 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -296,8 +296,6 @@ static struct class *ppp_class;
/* per net-namespace data */
static inline struct ppp_net *ppp_pernet(struct net *net)
{
- BUG_ON(!net);
-
return net_generic(net, ppp_net_id);
}