[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1278767508-10164-1-git-send-email-segooon@gmail.com>
Date: Sat, 10 Jul 2010 17:11:47 +0400
From: Kulikov Vasiliy <segooon@...il.com>
To: kernel-janitors@...r.kernel.org
Cc: Simon Kelley <simon@...kelleys.org.uk>,
"John W. Linville" <linville@...driver.com>,
"David S. Miller" <davem@...emloft.net>,
Stephen Hemminger <shemminger@...tta.com>,
Eric Dumazet <eric.dumazet@...il.com>,
Ben Hutchings <ben@...adent.org.uk>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org
Subject: [PATCH] atmel: unregister_netdev() on error
We must unregister registered device if probe_atmel_card() fails.
Signed-off-by: Kulikov Vasiliy <segooon@...il.com>
---
drivers/net/wireless/atmel.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index c8f7090..b9334a3 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -1626,7 +1626,7 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port,
if (!probe_atmel_card(dev)) {
unregister_netdev(dev);
- goto err_out_res;
+ goto err_out_unreg;
}
netif_carrier_off(dev);
@@ -1640,6 +1640,9 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port,
return dev;
+err_out_unreg:
+ unregister_netdev(dev);
+
err_out_res:
release_region(dev->base_addr, 32);
err_out_irq:
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists