Revert "atm: Do not free already unregistered net device."
[linux-2.6.git] / net / atm / br2684.c
index 13858e2..9d52ebf 100644 (file)
@@ -350,6 +350,7 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
                        list_del(&brdev->br2684_devs);
                        write_unlock_irq(&devs_lock);
                        unregister_netdev(net_dev);
+                       free_netdev(net_dev);
                }
                return;
        }
@@ -770,6 +771,7 @@ static void __exit br2684_exit(void)
 
                list_del(&brdev->br2684_devs);
                unregister_netdev(net_dev);
+               free_netdev(net_dev);
        }
 }