Skip to content

Commit

Permalink
pppoe: remove unnecessary checks in pppoe_flush_dev
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed May 5, 2010
1 parent 0a12761 commit 8753d29
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/net/pppoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 8753d29

Please sign in to comment.