Skip to content

Commit 02a896c

Browse files
Aditya Pakkidavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5532946 commit 02a896c

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/net/ppp/pppoe.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ static inline bool stage_session(__be16 sid)
119119

120120
static inline struct pppoe_net *pppoe_pernet(struct net *net)
121121
{
122-
BUG_ON(!net);
123-
124122
return net_generic(net, pppoe_net_id);
125123
}
126124

0 commit comments

Comments
 (0)