mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 16:38:12 +00:00
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>
This commit is contained in:
parent
b39c78b2aa
commit
1f62343110
1 changed files with 0 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue