aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-06-30 08:56:13 -0400
committerJeff Garzik <jeff@garzik.org>2006-07-05 14:08:08 -0400
commitb07db75a9f542c1a1745fcb047fd743843db8daa (patch)
tree17e7fa360f29d0809967acb73914e6b3b3adde47 /drivers
parent22db99bd32646aa33051e23420ff3517cc70cad5 (diff)
[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')
-rw-r--r--drivers/net/declance.c7
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,
703 return IRQ_HANDLED; 703 return IRQ_HANDLED;
704} 704}
705 705
706static irqreturn_t 706static irqreturn_t lance_interrupt(const int irq, void *dev_id,
707lance_interrupt(const int irq, void *dev_id, struct pt_regs *regs) 707 struct pt_regs *regs)
708{ 708{
709 struct net_device *dev = (struct net_device *) dev_id; 709 struct net_device *dev = (struct net_device *) dev_id;
710 struct lance_private *lp = netdev_priv(dev); 710 struct lance_private *lp = netdev_priv(dev);
@@ -1253,7 +1253,7 @@ static int __init dec_lance_init(const int type, const int slot)
1253 return 0; 1253 return 0;
1254 1254
1255err_out_free_dev: 1255err_out_free_dev:
1256 kfree(dev); 1256 free_netdev(dev);
1257 1257
1258err_out: 1258err_out:
1259 return ret; 1259 return ret;
@@ -1299,6 +1299,7 @@ static void __exit dec_lance_cleanup(void)
1299 while (root_lance_dev) { 1299 while (root_lance_dev) {
1300 struct net_device *dev = root_lance_dev; 1300 struct net_device *dev = root_lance_dev;
1301 struct lance_private *lp = netdev_priv(dev); 1301 struct lance_private *lp = netdev_priv(dev);
1302
1302 unregister_netdev(dev); 1303 unregister_netdev(dev);
1303#ifdef CONFIG_TC 1304#ifdef CONFIG_TC
1304 if (lp->slot >= 0) 1305 if (lp->slot >= 0)