Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pppoe: remove redundant BUG_ON() check in pppoe_pernet

Passing NULL to pppoe_pernet causes a crash via BUG_ON.
Dereferencing net in net_generici() also has the same effect. This patch
removes the redundant BUG_ON check on the same parameter.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Aditya Pakki and committed by
David S. Miller
02a896ca 5532946e

-2
-2
drivers/net/ppp/pppoe.c
··· 119 119 120 120 static inline struct pppoe_net *pppoe_pernet(struct net *net) 121 121 { 122 - BUG_ON(!net); 123 - 124 122 return net_generic(net, pppoe_net_id); 125 123 } 126 124