diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2009-06-12 07:16:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 14:57:47 -0400 |
commit | c5483b71936333ba9474f57d0f3a7a7abf9b87a0 (patch) | |
tree | 599a485034698c38a2071528a0c57f5f547d152a /drivers/net/wireless/wl12xx/debugfs.c | |
parent | 01d9cfbdaadc64a46b57437c989bbad241074135 (diff) |
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>
Diffstat (limited to 'drivers/net/wireless/wl12xx/debugfs.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/debugfs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/debugfs.c b/drivers/net/wireless/wl12xx/debugfs.c index 3cc5460c11f3..94ad99485651 100644 --- a/drivers/net/wireless/wl12xx/debugfs.c +++ b/drivers/net/wireless/wl12xx/debugfs.c | |||
@@ -95,9 +95,13 @@ static const struct file_operations sub## _ ##name## _ops = { \ | |||
95 | 95 | ||
96 | static void wl12xx_debugfs_update_stats(struct wl12xx *wl) | 96 | static void wl12xx_debugfs_update_stats(struct wl12xx *wl) |
97 | { | 97 | { |
98 | int ret; | ||
99 | |||
98 | mutex_lock(&wl->mutex); | 100 | mutex_lock(&wl->mutex); |
99 | 101 | ||
100 | wl12xx_ps_elp_wakeup(wl); | 102 | ret = wl12xx_ps_elp_wakeup(wl); |
103 | if (ret < 0) | ||
104 | goto out; | ||
101 | 105 | ||
102 | if (wl->state == WL12XX_STATE_ON && | 106 | if (wl->state == WL12XX_STATE_ON && |
103 | time_after(jiffies, wl->stats.fw_stats_update + | 107 | time_after(jiffies, wl->stats.fw_stats_update + |
@@ -108,6 +112,7 @@ static void wl12xx_debugfs_update_stats(struct wl12xx *wl) | |||
108 | 112 | ||
109 | wl12xx_ps_elp_sleep(wl); | 113 | wl12xx_ps_elp_sleep(wl); |
110 | 114 | ||
115 | out: | ||
111 | mutex_unlock(&wl->mutex); | 116 | mutex_unlock(&wl->mutex); |
112 | } | 117 | } |
113 | 118 | ||