aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/b43/main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 88d2c15d3fbe..f21355da84bd 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -3630,6 +3630,7 @@ static int b43_op_start(struct ieee80211_hw *hw)
3630 struct b43_wldev *dev = wl->current_dev; 3630 struct b43_wldev *dev = wl->current_dev;
3631 int did_init = 0; 3631 int did_init = 0;
3632 int err = 0; 3632 int err = 0;
3633 bool do_rfkill_exit = 0;
3633 3634
3634 /* First register RFkill. 3635 /* First register RFkill.
3635 * LEDs that are registered later depend on it. */ 3636 * LEDs that are registered later depend on it. */
@@ -3639,8 +3640,10 @@ static int b43_op_start(struct ieee80211_hw *hw)
3639 3640
3640 if (b43_status(dev) < B43_STAT_INITIALIZED) { 3641 if (b43_status(dev) < B43_STAT_INITIALIZED) {
3641 err = b43_wireless_core_init(dev); 3642 err = b43_wireless_core_init(dev);
3642 if (err) 3643 if (err) {
3644 do_rfkill_exit = 1;
3643 goto out_mutex_unlock; 3645 goto out_mutex_unlock;
3646 }
3644 did_init = 1; 3647 did_init = 1;
3645 } 3648 }
3646 3649
@@ -3649,6 +3652,7 @@ static int b43_op_start(struct ieee80211_hw *hw)
3649 if (err) { 3652 if (err) {
3650 if (did_init) 3653 if (did_init)
3651 b43_wireless_core_exit(dev); 3654 b43_wireless_core_exit(dev);
3655 do_rfkill_exit = 1;
3652 goto out_mutex_unlock; 3656 goto out_mutex_unlock;
3653 } 3657 }
3654 } 3658 }
@@ -3656,6 +3660,9 @@ static int b43_op_start(struct ieee80211_hw *hw)
3656 out_mutex_unlock: 3660 out_mutex_unlock:
3657 mutex_unlock(&wl->mutex); 3661 mutex_unlock(&wl->mutex);
3658 3662
3663 if (do_rfkill_exit)
3664 b43_rfkill_exit(dev);
3665
3659 return err; 3666 return err;
3660} 3667}
3661 3668