Re: [PATCH] drm/sched: Fix passing zero to 'PTR_ERR' warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 29.10.19 um 16:04 schrieb Andrey Grodzovsky:
Fix a static code checker warning.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@xxxxxxx>

Well that one was even new to me.

Patch is Reviewed-by: Christian König <christian.koenig@xxxxxxx>

---
  drivers/gpu/drm/scheduler/sched_main.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
index f39b97e..898b0c9 100644
--- a/drivers/gpu/drm/scheduler/sched_main.c
+++ b/drivers/gpu/drm/scheduler/sched_main.c
@@ -497,7 +497,7 @@ void drm_sched_resubmit_jobs(struct drm_gpu_scheduler *sched)
if (IS_ERR_OR_NULL(fence)) {
  			s_job->s_fence->parent = NULL;
-			dma_fence_set_error(&s_fence->finished, PTR_ERR(fence));
+			dma_fence_set_error(&s_fence->finished, PTR_ERR_OR_ZERO(fence));
  		} else {
  			s_job->s_fence->parent = fence;
  		}
@@ -742,7 +742,7 @@ static int drm_sched_main(void *param)
  			dma_fence_put(fence);
  		} else {
- dma_fence_set_error(&s_fence->finished, PTR_ERR(fence));
+			dma_fence_set_error(&s_fence->finished, PTR_ERR_OR_ZERO(fence));
  			drm_sched_process_job(NULL, &sched_job->cb);
  		}

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux