wl12xx: check if elp wakeup failed

Check the return call from wl12xx_ps_elp_wakeup() and bail out if it
fails. This shouldn't happen, but if does there's a fundamental low
level issue.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Kalle Valo
2009-06-12 14:16:32 +03:00
committed by John W. Linville
parent 01d9cfbdaa
commit c5483b7193
4 changed files with 60 additions and 25 deletions

View File

@@ -95,9 +95,13 @@ static const struct file_operations sub## _ ##name## _ops = { \
static void wl12xx_debugfs_update_stats(struct wl12xx *wl)
{
int ret;
mutex_lock(&wl->mutex);
wl12xx_ps_elp_wakeup(wl);
ret = wl12xx_ps_elp_wakeup(wl);
if (ret < 0)
goto out;
if (wl->state == WL12XX_STATE_ON &&
time_after(jiffies, wl->stats.fw_stats_update +
@@ -108,6 +112,7 @@ static void wl12xx_debugfs_update_stats(struct wl12xx *wl)
wl12xx_ps_elp_sleep(wl);
out:
mutex_unlock(&wl->mutex);
}