From 5a7e2abe6c9d1809898937dfa026ca2e5464db45 Mon Sep 17 00:00:00 2001 From: Sourab Gupta Date: Tue, 1 May 2018 11:06:51 +0530 Subject: gpu: nvgpu: fix cond_wait return value in channel poll worker The return value from NVGPU_COND_WAIT_INTERRUPTIBLE in channel poll worker is wrongly compared with 0 and the boolean result is assigned to ret value used subsequently. Instead, the direct return value from NVGPU_COND_WAIT_INTERRUPTIBLE should be used. This bug seems remnant of the following patch which moved the handling from 'wait_event_timeout' to 'NVGPU_COND_WAIT'. commit 301965fb77b3dc97445957712b82ce430eaa17e3 gpu: nvgpu: Use nvgpu_cond in channel worker Change-Id: Id48e197756a6855b35a9ee0dc26d014b62ed3860 Signed-off-by: Sourab Gupta Reviewed-on: https://git-master.nvidia.com/r/1705976 Reviewed-by: Konsta Holtta Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 48677529..a7a08b5a 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c @@ -1606,7 +1606,7 @@ static int gk20a_channel_poll_worker(void *arg) ret = NVGPU_COND_WAIT_INTERRUPTIBLE( &worker->wq, __gk20a_channel_worker_pending(g, get), - watchdog_interval) > 0; + watchdog_interval); if (ret == 0) gk20a_channel_worker_process(g, &get); -- cgit v1.2.2