mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
pppoe: remove unnecessary checks in pppoe_flush_dev
pernet memory is guaranteed to exist when notifiers are called. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0a12761bcd
commit
8753d29fd5
@ -290,12 +290,6 @@ static void pppoe_flush_dev(struct net_device *dev)
|
||||
struct pppoe_net *pn;
|
||||
int i;
|
||||
|
||||
BUG_ON(dev == NULL);
|
||||
|
||||
pn = pppoe_pernet(dev_net(dev));
|
||||
if (!pn) /* already freed */
|
||||
return;
|
||||
|
||||
write_lock_bh(&pn->hash_lock);
|
||||
for (i = 0; i < PPPOE_HASH_SIZE; i++) {
|
||||
struct pppox_sock *po = pn->hash_table[i];
|
||||
|
Loading…
Reference in New Issue
Block a user