diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-06-30 14:56:13 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-07-05 20:08:08 +0200 |
commit | b07db75a9f542c1a1745fcb047fd743843db8daa (patch) | |
tree | 17e7fa360f29d0809967acb73914e6b3b3adde47 /drivers/net/declance.c | |
parent | [PATCH] remove dead entry in net wan Kconfig (diff) | |
download | linux-b07db75a9f542c1a1745fcb047fd743843db8daa.tar.xz linux-b07db75a9f542c1a1745fcb047fd743843db8daa.zip |
[PATCH] Fix freeing of net device
Plus optical sugar.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/declance.c')
-rw-r--r-- | drivers/net/declance.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/declance.c b/drivers/net/declance.c index 2038ca7e49ce..6ad5796121c8 100644 --- a/drivers/net/declance.c +++ b/drivers/net/declance.c @@ -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) |