Skip to content

Commit

Permalink
ath5k: avoid leaking mutex in ath5k_config
Browse files Browse the repository at this point in the history
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
John W. Linville committed Jun 3, 2009
1 parent 047584c commit 55aa4e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/wireless/ath/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2779,7 +2779,7 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed)

ret = ath5k_chan_set(sc, conf->channel);
if (ret < 0)
return ret;
goto unlock;

if ((changed & IEEE80211_CONF_CHANGE_POWER) &&
(sc->power_level != conf->power_level)) {
Expand Down Expand Up @@ -2808,8 +2808,9 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed)
*/
ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_DEFAULT);

unlock:
mutex_unlock(&sc->lock);
return 0;
return ret;
}

#define SUPPORTED_FIF_FLAGS \
Expand Down

0 comments on commit 55aa4e0

Please sign in to comment.