diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-04-30 16:52:02 -0700 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-05-09 16:47:34 +0300 |
commit | 4e0ff946ee0b010a917dad6ae2fcbdc7e6f9ac16 (patch) | |
tree | c8c27424232c48427f083e9aa5472b2c0d510321 /drivers/net/wireless/mwifiex | |
parent | a534f3b60cac1af43a8dd0ab01afb25e36c9b631 (diff) | |
download | blackbird-op-linux-4e0ff946ee0b010a917dad6ae2fcbdc7e6f9ac16.tar.gz blackbird-op-linux-4e0ff946ee0b010a917dad6ae2fcbdc7e6f9ac16.zip |
mwifiex: do not return success when command times out
wait_event_interruptible_timeout() returns 0 upon timeout. We should
convert it to a negative error code (such as -ETIMEDOUT) instead of
returning it directly, as return code of 0 indicates that command was
executed.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex')
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_ioctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c index 0599e41e253c..a0bc26c5eac0 100644 --- a/drivers/net/wireless/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/mwifiex/sta_ioctl.c @@ -64,6 +64,8 @@ int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter, *(cmd_queued->condition), (12 * HZ)); if (status <= 0) { + if (status == 0) + status = -ETIMEDOUT; dev_err(adapter->dev, "cmd_wait_q terminated: %d\n", status); mwifiex_cancel_all_pending_cmd(adapter); return status; |