2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-03 11:13:56 +08:00

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>
This commit is contained in:
Junwei Zhang 2015-08-26 09:34:59 +08:00 committed by Alex Deucher
parent 9066b0c318
commit 113cd9dacb

View File

@ -966,7 +966,7 @@ signed long amdgpu_fence_wait_multiple(struct amdgpu_device *adev,
fence_rm_cb:
for (idx = 0; idx < count; ++idx) {
fence = array[idx];
if (fence)
if (fence && cb[idx].base.func)
fence_remove_callback(fence, &cb[idx].base);
}