From: Rajkumar Manoharan Date: Mon, 11 Jun 2012 06:49:30 +0000 (+0530) Subject: ath9k: restore power state on set channel failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8389fb3fd7c0bbe3289578f698917f594e0b6fc9;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git ath9k: restore power state on set channel failure Not doing so, could cause imbalance in powersave count. Signed-off-by: Rajkumar Manoharan Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index c0f478b0a9a..e655f2a907b 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -1258,6 +1258,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) if (ath_set_channel(sc, hw, &sc->sc_ah->channels[pos]) < 0) { ath_err(common, "Unable to set channel\n"); mutex_unlock(&sc->mutex); + ath9k_ps_restore(sc); return -EINVAL; }