diff options
author | John W. Linville <linville@tuxdriver.com> | 2009-05-25 15:28:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-06-03 14:05:08 -0400 |
commit | 55aa4e0f16aa55e4b8cbe40b11e09cf029848f02 (patch) | |
tree | fbb957f66b7211e72c3776abd774eba503a590b7 /drivers/net/wireless/ath/ath5k/base.c | |
parent | 047584ce94108012288554a5f84585d792cc7f8f (diff) |
ath5k: avoid leaking mutex in ath5k_config
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/base.c')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index fb5193764afa..dd6dc8dc740b 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -2779,7 +2779,7 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed) | |||
2779 | 2779 | ||
2780 | ret = ath5k_chan_set(sc, conf->channel); | 2780 | ret = ath5k_chan_set(sc, conf->channel); |
2781 | if (ret < 0) | 2781 | if (ret < 0) |
2782 | return ret; | 2782 | goto unlock; |
2783 | 2783 | ||
2784 | if ((changed & IEEE80211_CONF_CHANGE_POWER) && | 2784 | if ((changed & IEEE80211_CONF_CHANGE_POWER) && |
2785 | (sc->power_level != conf->power_level)) { | 2785 | (sc->power_level != conf->power_level)) { |
@@ -2808,8 +2808,9 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed) | |||
2808 | */ | 2808 | */ |
2809 | ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_DEFAULT); | 2809 | ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_DEFAULT); |
2810 | 2810 | ||
2811 | unlock: | ||
2811 | mutex_unlock(&sc->lock); | 2812 | mutex_unlock(&sc->lock); |
2812 | return 0; | 2813 | return ret; |
2813 | } | 2814 | } |
2814 | 2815 | ||
2815 | #define SUPPORTED_FIF_FLAGS \ | 2816 | #define SUPPORTED_FIF_FLAGS \ |