diff options
author | Andrey Grodzovsky <andrey.grodzovsky@amd.com> | 2019-05-22 09:57:23 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-05-24 13:21:06 -0500 |
commit | b576ff902f8a050eb5b5ba9a016cb9212f730b05 (patch) | |
tree | 4b77e395fa48e13edaacd6e55370b81b00bcea20 /drivers/gpu/drm/scheduler | |
parent | 9f1f1a2dab38d4ce87a13565cf4dc1b73bef3a5f (diff) | |
download | linux-stable-b576ff902f8a050eb5b5ba9a016cb9212f730b05.tar.gz linux-stable-b576ff902f8a050eb5b5ba9a016cb9212f730b05.tar.bz2 linux-stable-b576ff902f8a050eb5b5ba9a016cb9212f730b05.zip |
drm/sched: Fix static checker warning for potential NULL ptr
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1558533443-7795-1-git-send-email-andrey.grodzovsky@amd.com
Diffstat (limited to 'drivers/gpu/drm/scheduler')
-rw-r--r-- | drivers/gpu/drm/scheduler/sched_main.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index cf596fc0355b..49e7d0780414 100644 --- a/drivers/gpu/drm/scheduler/sched_main.c +++ b/drivers/gpu/drm/scheduler/sched_main.c @@ -286,16 +286,17 @@ static void drm_sched_job_timedout(struct work_struct *work) job = list_first_entry_or_null(&sched->ring_mirror_list, struct drm_sched_job, node); - if (job) + if (job) { job->sched->ops->timedout_job(job); - /* - * Guilty job did complete and hence needs to be manually removed - * See drm_sched_stop doc. - */ - if (sched->free_guilty) { - job->sched->ops->free_job(job); - sched->free_guilty = false; + /* + * Guilty job did complete and hence needs to be manually removed + * See drm_sched_stop doc. + */ + if (sched->free_guilty) { + job->sched->ops->free_job(job); + sched->free_guilty = false; + } } spin_lock_irqsave(&sched->job_list_lock, flags); |