]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] Fix freeing of net device
authorRalf Baechle <ralf@linux-mips.org>
Fri, 30 Jun 2006 12:56:13 +0000 (13:56 +0100)
committerJeff Garzik <jeff@garzik.org>
Wed, 5 Jul 2006 18:08:08 +0000 (14:08 -0400)
Plus optical sugar.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/declance.c

index 2038ca7e49ceb7dc6ad702c6ce75acbe2d0959d8..6ad5796121c82b2a327a29baac07c31ac597ac59 100644 (file)
@@ -703,8 +703,8 @@ static irqreturn_t lance_dma_merr_int(const int irq, void *dev_id,
        return IRQ_HANDLED;
 }
 
-static irqreturn_t
-lance_interrupt(const int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t lance_interrupt(const int irq, void *dev_id,
+                                  struct pt_regs *regs)
 {
        struct net_device *dev = (struct net_device *) dev_id;
        struct lance_private *lp = netdev_priv(dev);
@@ -1253,7 +1253,7 @@ static int __init dec_lance_init(const int type, const int slot)
        return 0;
 
 err_out_free_dev:
-       kfree(dev);
+       free_netdev(dev);
 
 err_out:
        return ret;
@@ -1299,6 +1299,7 @@ static void __exit dec_lance_cleanup(void)
        while (root_lance_dev) {
                struct net_device *dev = root_lance_dev;
                struct lance_private *lp = netdev_priv(dev);
+
                unregister_netdev(dev);
 #ifdef CONFIG_TC
                if (lp->slot >= 0)