diff options
author | Luciano Coelho <coelho@ti.com> | 2012-06-25 07:41:20 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-06-26 13:20:19 -0400 |
commit | 8b425e62d96a3b3a3cc68e6203267f92d1a01946 (patch) | |
tree | deec8379a29e298f2b56dd89253735edcc3410b5 | |
parent | e59bec1628654b6dcbad4e64d43c41c1f31d216c (diff) |
wlcore: fix some failure cases in wlcore_probe()
We need to release the IRQ if hw_info() or identify_chip() fails. And
we need unregister the HW with mac80211 if there are any failures
after it's registered.
Signed-off-by: Luciano Coelho <coelho@ti.com>
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 372ccf277b1e..c5a9ffe6cc91 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
@@ -5520,12 +5520,12 @@ int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev) | |||
5520 | ret = wl12xx_get_hw_info(wl); | 5520 | ret = wl12xx_get_hw_info(wl); |
5521 | if (ret < 0) { | 5521 | if (ret < 0) { |
5522 | wl1271_error("couldn't get hw info"); | 5522 | wl1271_error("couldn't get hw info"); |
5523 | goto out; | 5523 | goto out_irq; |
5524 | } | 5524 | } |
5525 | 5525 | ||
5526 | ret = wl->ops->identify_chip(wl); | 5526 | ret = wl->ops->identify_chip(wl); |
5527 | if (ret < 0) | 5527 | if (ret < 0) |
5528 | goto out; | 5528 | goto out_irq; |
5529 | 5529 | ||
5530 | ret = wl1271_init_ieee80211(wl); | 5530 | ret = wl1271_init_ieee80211(wl); |
5531 | if (ret) | 5531 | if (ret) |
@@ -5539,7 +5539,7 @@ int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev) | |||
5539 | ret = device_create_file(wl->dev, &dev_attr_bt_coex_state); | 5539 | ret = device_create_file(wl->dev, &dev_attr_bt_coex_state); |
5540 | if (ret < 0) { | 5540 | if (ret < 0) { |
5541 | wl1271_error("failed to create sysfs file bt_coex_state"); | 5541 | wl1271_error("failed to create sysfs file bt_coex_state"); |
5542 | goto out_irq; | 5542 | goto out_unreg; |
5543 | } | 5543 | } |
5544 | 5544 | ||
5545 | /* Create sysfs file to get HW PG version */ | 5545 | /* Create sysfs file to get HW PG version */ |
@@ -5564,6 +5564,9 @@ out_hw_pg_ver: | |||
5564 | out_bt_coex_state: | 5564 | out_bt_coex_state: |
5565 | device_remove_file(wl->dev, &dev_attr_bt_coex_state); | 5565 | device_remove_file(wl->dev, &dev_attr_bt_coex_state); |
5566 | 5566 | ||
5567 | out_unreg: | ||
5568 | wl1271_unregister_hw(wl); | ||
5569 | |||
5567 | out_irq: | 5570 | out_irq: |
5568 | free_irq(wl->irq, wl); | 5571 | free_irq(wl->irq, wl); |
5569 | 5572 | ||