pppoe: remove unnecessary checks in pppoe_flush_dev
authorJiri Pirko <jpirko@redhat.com>
Wed, 5 May 2010 07:56:33 +0000 (00:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 May 2010 07:56:33 +0000 (00:56 -0700)
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>
drivers/net/pppoe.c

index c059c8db42e30478cc90135a4566f59c923a2475..99f031a08a015942609eebd6a7dc897d77dcc00a 100644 (file)
@@ -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];