From: Samuel Ortiz <samuel.ortiz@nokia.com>
To: "ext David S. Miller" <davem@davemloft.net>
Cc: IrDA users <irda-users@lists.sourceforge.net>,
Jean Tourrilhes <jt@hpl.hp.com>,
netdev@vger.kernel.org
Subject: [PATCH] IrDA: irda-usb, unregister netdev when patch upload fails
Date: Fri, 14 Apr 2006 13:16:07 +0300 [thread overview]
Message-ID: <20060414101607.GA32724@irie> (raw)
Hi David,
In the STIR421x case, when the firmware upload fails, we need to unregister_netdev. Otherwise we hit a BUG on free_netdev(), if sysfs is enabled.
Signed-off-by: Samuel Ortiz <samuel.ortiz@nokia.com>
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
index 606243d..96bdb73 100644
--- a/drivers/net/irda/irda-usb.c
+++ b/drivers/net/irda/irda-usb.c
@@ -1815,14 +1815,14 @@ static int irda_usb_probe(struct usb_int
self->needspatch = (ret < 0);
if (ret < 0) {
printk("patch_device failed\n");
- goto err_out_4;
+ goto err_out_5;
}
/* replace IrDA class descriptor with what patched device is now reporting */
irda_desc = irda_usb_find_class_desc (self->usbintf);
if (irda_desc == NULL) {
ret = -ENODEV;
- goto err_out_4;
+ goto err_out_5;
}
if (self->irda_desc)
kfree (self->irda_desc);
@@ -1832,6 +1832,8 @@ static int irda_usb_probe(struct usb_int
return 0;
+err_out_5:
+ unregister_netdev(self->netdev);
err_out_4:
kfree(self->speed_buff);
err_out_3:
next reply other threads:[~2006-04-14 10:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-14 10:16 Samuel Ortiz [this message]
2006-04-14 23:02 ` [PATCH] IrDA: irda-usb, unregister netdev when patch upload fails David S. Miller
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=20060414101607.GA32724@irie \
--to=samuel.ortiz@nokia.com \
--cc=davem@davemloft.net \
--cc=irda-users@lists.sourceforge.net \
--cc=jt@hpl.hp.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).