Commit 7fbd31cc authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: fix NULL ptr dref in the VM code

The exclusive fence is of course perfectly optional here.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9d18c131
...@@ -1789,9 +1789,11 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev, ...@@ -1789,9 +1789,11 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
return r; return r;
/* Wait for any BO move to be completed */ /* Wait for any BO move to be completed */
r = dma_fence_wait(exclusive, true); if (exclusive) {
if (unlikely(r)) r = dma_fence_wait(exclusive, true);
return r; if (unlikely(r))
return r;
}
params.func = amdgpu_vm_cpu_set_ptes; params.func = amdgpu_vm_cpu_set_ptes;
params.pages_addr = pages_addr; params.pages_addr = pages_addr;
......
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