diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-06-30 08:56:13 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-07-05 14:08:08 -0400 |
commit | b07db75a9f542c1a1745fcb047fd743843db8daa (patch) | |
tree | 17e7fa360f29d0809967acb73914e6b3b3adde47 /drivers | |
parent | 22db99bd32646aa33051e23420ff3517cc70cad5 (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.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, | |||
703 | return IRQ_HANDLED; | 703 | return IRQ_HANDLED; |
704 | } | 704 | } |
705 | 705 | ||
706 | static irqreturn_t | 706 | static irqreturn_t lance_interrupt(const int irq, void *dev_id, |
707 | lance_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 | ||
1255 | err_out_free_dev: | 1255 | err_out_free_dev: |
1256 | kfree(dev); | 1256 | free_netdev(dev); |
1257 | 1257 | ||
1258 | err_out: | 1258 | err_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) |