Skip to content

Commit

Permalink
[PATCH] Fix freeing of net device
Browse files Browse the repository at this point in the history
Plus optical sugar.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Ralf Baechle authored and Jeff Garzik committed Jul 5, 2006
1 parent 22db99b commit b07db75
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/net/declance.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b07db75

Please sign in to comment.