Skip to content

Commit

Permalink
Set wlvif->ps_compl to NULL in before return
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pontus Fuchs authored and Luciano Coelho committed Dec 15, 2011
1 parent 7f74484 commit ef18706
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}
Expand Down

0 comments on commit ef18706

Please sign in to comment.