mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
wigig_sensing: fix usage of wait_event_interruptible_timeout()
wait_event_interruptable_timeout() returns a positive number in a success case. This positive number needs to be set to 0 so that the calling function recognizes it as a success. Change-Id: Ic8565f95976f98682334da84d950257d43d6a320 Signed-off-by: Gidon Studinski <gidons@codeaurora.org> Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
This commit is contained in:
parent
e85bd7e098
commit
c4c4c4f1e2
1 changed files with 4 additions and 2 deletions
|
|
@ -563,12 +563,14 @@ static int wigig_sensing_ioc_change_mode(struct wigig_sensing_ctx *ctx,
|
|||
pr_err("wait_event_interruptible_timeout() interrupted by a signal (%d)\n",
|
||||
rc);
|
||||
goto End;
|
||||
}
|
||||
if (rc == 0) {
|
||||
} else if (rc == 0) {
|
||||
/* Timeout, FW did not respond in time */
|
||||
pr_err("wait_event_interruptible_timeout() timed out\n");
|
||||
rc = -ETIME;
|
||||
goto End;
|
||||
} else {
|
||||
/* rc > 0, this is fine, set rc to 0 */
|
||||
rc = 0;
|
||||
}
|
||||
|
||||
if (ctx->stm.state != ctx->stm.state_request) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue