2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 12:43:55 +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:
Jiri Pirko 2010-05-05 00:56:33 -07:00 committed by David S. Miller
parent 0a12761bcd
commit 8753d29fd5

View File

@ -290,12 +290,6 @@ static void pppoe_flush_dev(struct net_device *dev)
struct pppoe_net *pn; struct pppoe_net *pn;
int i; int i;
BUG_ON(dev == NULL);
pn = pppoe_pernet(dev_net(dev));
if (!pn) /* already freed */
return;
write_lock_bh(&pn->hash_lock); write_lock_bh(&pn->hash_lock);
for (i = 0; i < PPPOE_HASH_SIZE; i++) { for (i = 0; i < PPPOE_HASH_SIZE; i++) {
struct pppox_sock *po = pn->hash_table[i]; struct pppox_sock *po = pn->hash_table[i];