diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2009-11-30 10:17:52 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-21 18:55:49 -0500 |
commit | 478fdf2bcef73747eb99bc6dd3565f093942647a (patch) | |
tree | b4a26445c5131adf591c5976ebb16bce01d6b5b1 /drivers | |
parent | d67e261829d405ed19a6c2e648f224e352012f52 (diff) |
wl1251: fix error handling in wl1251_op_config()
Not all return values were checked and one exit from function didn't put
firmware sleep after the error.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c index 0417745d7fc4..24050d56a9de 100644 --- a/drivers/net/wireless/wl12xx/wl1251_main.c +++ b/drivers/net/wireless/wl12xx/wl1251_main.c @@ -645,20 +645,25 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) * through the bss_info_changed() hook. */ ret = wl1251_ps_set_mode(wl, STATION_POWER_SAVE_MODE); + if (ret < 0) + goto out_sleep; } else if (!(conf->flags & IEEE80211_CONF_PS) && wl->psm_requested) { wl1251_debug(DEBUG_PSM, "psm disabled"); wl->psm_requested = false; - if (wl->psm) + if (wl->psm) { ret = wl1251_ps_set_mode(wl, STATION_ACTIVE_MODE); + if (ret < 0) + goto out_sleep; + } } if (conf->power_level != wl->power_level) { ret = wl1251_acx_tx_power(wl, conf->power_level); if (ret < 0) - goto out; + goto out_sleep; wl->power_level = conf->power_level; } |