From: Ralf Baechle <ralf@linux-mips.org>
To: Jeff Garzik <jeff@garzik.org>, netdev@vger.kernel.org
Subject: [DECLANCE] Fix freeing of net device
Date: Fri, 30 Jun 2006 13:56:13 +0100 [thread overview]
Message-ID: <20060630125613.GA10454@linux-mips.org> (raw)
Plus optical sugar.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
diff --git a/drivers/net/declance.c b/drivers/net/declance.c
index d3d958e..92116c2 100644
--- a/drivers/net/declance.c
+++ b/drivers/net/declance.c
@@ -704,8 +704,8 @@ static irqreturn_t lance_dma_merr_int(co
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);
@@ -1254,7 +1254,7 @@ #endif
return 0;
err_out_free_dev:
- kfree(dev);
+ free_netdev(dev);
err_out:
return ret;
@@ -1300,6 +1300,7 @@ static void __exit dec_lance_cleanup(voi
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)
reply other threads:[~2006-06-30 12:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060630125613.GA10454@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.