Commit d7c5782a authored by Andrey Grodzovsky's avatar Andrey Grodzovsky Committed by Alex Deucher

drm/sched: Fix passing zero to 'PTR_ERR' warning v2

Fix a static code checker warning.

v2: Drop PTR_ERR_OR_ZERO.
Signed-off-by: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: default avatarEmily Deng <Emily.Deng@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 224f82e5
...@@ -496,8 +496,10 @@ void drm_sched_resubmit_jobs(struct drm_gpu_scheduler *sched) ...@@ -496,8 +496,10 @@ void drm_sched_resubmit_jobs(struct drm_gpu_scheduler *sched)
fence = sched->ops->run_job(s_job); fence = sched->ops->run_job(s_job);
if (IS_ERR_OR_NULL(fence)) { if (IS_ERR_OR_NULL(fence)) {
if (IS_ERR(fence))
dma_fence_set_error(&s_fence->finished, PTR_ERR(fence));
s_job->s_fence->parent = NULL; s_job->s_fence->parent = NULL;
dma_fence_set_error(&s_fence->finished, PTR_ERR(fence));
} else { } else {
s_job->s_fence->parent = fence; s_job->s_fence->parent = fence;
} }
...@@ -746,8 +748,9 @@ static int drm_sched_main(void *param) ...@@ -746,8 +748,9 @@ static int drm_sched_main(void *param)
r); r);
dma_fence_put(fence); dma_fence_put(fence);
} else { } else {
if (IS_ERR(fence))
dma_fence_set_error(&s_fence->finished, PTR_ERR(fence));
dma_fence_set_error(&s_fence->finished, PTR_ERR(fence));
drm_sched_process_job(NULL, &sched_job->cb); drm_sched_process_job(NULL, &sched_job->cb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment