summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorShaoyun Liu <Shaoyun.Liu@amd.com>2018-07-12 05:33:00 +0300
committerOded Gabbay <oded.gabbay@gmail.com>2018-07-12 05:33:00 +0300
commit67ccea60591a0515c885af9bf8dfb932a905457f (patch)
tree240765a9fdab32d60898c005125998db92256f55 /drivers/gpu/drm/amd
parentb5d21aac33179e55807d0fb0c0e1f694c1dce2c3 (diff)
downloadlinux-67ccea60591a0515c885af9bf8dfb932a905457f.tar.xz
drm/amdgpu: Check NULL pointer for job before reset job's ring
job could be NULL when amdgpu_device_gpu_recover is called Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com> Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index b895584bb99f..13acef526c5b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3325,7 +3325,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
if (job && job->base.sched == &ring->sched)
continue;
- drm_sched_hw_job_reset(&ring->sched, &job->base);
+ drm_sched_hw_job_reset(&ring->sched, job ? &job->base : NULL);
/* after all hw jobs are reset, hw fence is meaningless, so force_completion */
amdgpu_fence_driver_force_completion(ring);