Skip to content

Commit 8a3f44a

Browse files
ISCAS-Vulabdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 36a7886 commit 8a3f44a

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/net/ppp/ppp_generic.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,6 @@ static struct class *ppp_class;
296296
/* per net-namespace data */
297297
static inline struct ppp_net *ppp_pernet(struct net *net)
298298
{
299-
BUG_ON(!net);
300-
301299
return net_generic(net, ppp_net_id);
302300
}
303301

0 commit comments

Comments
 (0)