Commit ef187067 authored by Pontus Fuchs's avatar Pontus Fuchs Committed by Luciano Coelho

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: default avatarPontus Fuchs <pontus.fuchs@gmail.com>
[small fix to use wlvif->ps_compl instead of wl->ps_compl]
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 7f74484a
...@@ -1580,24 +1580,24 @@ static int wl1271_configure_suspend_sta(struct wl1271 *wl, ...@@ -1580,24 +1580,24 @@ static int wl1271_configure_suspend_sta(struct wl1271 *wl,
ret = wait_for_completion_timeout( ret = wait_for_completion_timeout(
&compl, msecs_to_jiffies(WL1271_PS_COMPLETE_TIMEOUT)); &compl, msecs_to_jiffies(WL1271_PS_COMPLETE_TIMEOUT));
mutex_lock(&wl->mutex);
if (ret <= 0) { if (ret <= 0) {
wl1271_warning("couldn't enter ps mode!"); wl1271_warning("couldn't enter ps mode!");
ret = -EBUSY; ret = -EBUSY;
goto out; goto out_cleanup;
} }
/* take mutex again, and wakeup */
mutex_lock(&wl->mutex);
ret = wl1271_ps_elp_wakeup(wl); ret = wl1271_ps_elp_wakeup(wl);
if (ret < 0) if (ret < 0)
goto out_unlock; goto out_cleanup;
} }
out_sleep: out_sleep:
wl1271_ps_elp_sleep(wl); wl1271_ps_elp_sleep(wl);
out_cleanup:
wlvif->ps_compl = NULL;
out_unlock: out_unlock:
mutex_unlock(&wl->mutex); mutex_unlock(&wl->mutex);
out:
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment