netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IrDA: irda-usb, unregister netdev when patch upload fails
@ 2006-04-14 10:16 Samuel Ortiz
  2006-04-14 23:02 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Samuel Ortiz @ 2006-04-14 10:16 UTC (permalink / raw)
  To: ext David S. Miller; +Cc: IrDA users, Jean Tourrilhes, netdev

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:

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] IrDA: irda-usb, unregister netdev when patch upload fails
  2006-04-14 10:16 [PATCH] IrDA: irda-usb, unregister netdev when patch upload fails Samuel Ortiz
@ 2006-04-14 23:02 ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2006-04-14 23:02 UTC (permalink / raw)
  To: samuel.ortiz; +Cc: irda-users, jt, netdev

From: Samuel Ortiz <samuel.ortiz@nokia.com>
Date: Fri, 14 Apr 2006 13:16:07 +0300

> 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>

Applied, but please become familiar with the carriage return key on
your keyboard and format your changelog descirptions to ~80 columns.

Thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-04-14 23:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-14 10:16 [PATCH] IrDA: irda-usb, unregister netdev when patch upload fails Samuel Ortiz
2006-04-14 23:02 ` David S. Miller

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).