pppoe: remove unnecessary checks in pppoe_flush_dev
Jiri Pirko [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 c059c8d..99f031a 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];