diff options
author | Pontus Fuchs <pontus.fuchs@gmail.com> | 2011-12-14 14:32:23 +0100 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-12-15 10:19:46 +0200 |
commit | ef1870673dc3b66d8daec2b1fd1048992440e0e5 (patch) | |
tree | 463837f42daf80362b222aa363f5600cde5c6d73 /drivers/net/wireless/wl12xx | |
parent | 7f74484a460f6bb8656725babf2e977e47a3dab4 (diff) | |
download | blackbird-obmc-linux-ef1870673dc3b66d8daec2b1fd1048992440e0e5.tar.gz blackbird-obmc-linux-ef1870673dc3b66d8daec2b1fd1048992440e0e5.zip |
Set wlvif->ps_compl to NULL in before return
wl1271_configure_suspend_sta leaves a stale stack declared
completion in wlvif->ps_compl. Set it to NULL before returning.
Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
[small fix to use wlvif->ps_compl instead of wl->ps_compl]
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index ec446710ebb3..c3058419e227 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -1580,24 +1580,24 @@ static int wl1271_configure_suspend_sta(struct wl1271 *wl, ret = wait_for_completion_timeout( &compl, msecs_to_jiffies(WL1271_PS_COMPLETE_TIMEOUT)); + + mutex_lock(&wl->mutex); if (ret <= 0) { wl1271_warning("couldn't enter ps mode!"); ret = -EBUSY; - goto out; + goto out_cleanup; } - /* take mutex again, and wakeup */ - mutex_lock(&wl->mutex); - ret = wl1271_ps_elp_wakeup(wl); if (ret < 0) - goto out_unlock; + goto out_cleanup; } out_sleep: wl1271_ps_elp_sleep(wl); +out_cleanup: + wlvif->ps_compl = NULL; out_unlock: mutex_unlock(&wl->mutex); -out: return ret; } |