diff options
author | Junwei Zhang <Jerry.Zhang@amd.com> | 2015-08-25 21:34:59 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-26 17:50:04 -0400 |
commit | 113cd9dacbad4906e1c8db09233b9fdcb002f80d (patch) | |
tree | 9ea6e8e0372b44bd196f7be41ec04757dbc0d542 /drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | |
parent | 9066b0c318589f47b754a3def4fe8ec4688dc21a (diff) |
drm/amdgpu: adjust the judgement of removing fence callback
The fence in the array may be skipped if wait_all is false,
thus the related callback is not initialized with list head.
So removing this kind callback will cause NULL pointer reference.
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 9787337a65a1..f446bf2fedc9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | |||
@@ -966,7 +966,7 @@ signed long amdgpu_fence_wait_multiple(struct amdgpu_device *adev, | |||
966 | fence_rm_cb: | 966 | fence_rm_cb: |
967 | for (idx = 0; idx < count; ++idx) { | 967 | for (idx = 0; idx < count; ++idx) { |
968 | fence = array[idx]; | 968 | fence = array[idx]; |
969 | if (fence) | 969 | if (fence && cb[idx].base.func) |
970 | fence_remove_callback(fence, &cb[idx].base); | 970 | fence_remove_callback(fence, &cb[idx].base); |
971 | } | 971 | } |
972 | 972 | ||