Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ath5k: avoid leaking mutex in ath5k_config

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

+3 -2
+3 -2
drivers/net/wireless/ath/ath5k/base.c
··· 2779 2779 2780 2780 ret = ath5k_chan_set(sc, conf->channel); 2781 2781 if (ret < 0) 2782 - return ret; 2782 + goto unlock; 2783 2783 2784 2784 if ((changed & IEEE80211_CONF_CHANGE_POWER) && 2785 2785 (sc->power_level != conf->power_level)) { ··· 2808 2808 */ 2809 2809 ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_DEFAULT); 2810 2810 2811 + unlock: 2811 2812 mutex_unlock(&sc->lock); 2812 - return 0; 2813 + return ret; 2813 2814 } 2814 2815 2815 2816 #define SUPPORTED_FIF_FLAGS \