Commit 48c60c03 authored by Monk Liu's avatar Monk Liu Committed by Alex Deucher

drm/amdgpu: fix bug in fence driver fini

Using wrong counter for walking fences.  Fixes
a crash when unloading the driver.
Signed-off-by: default avatarMonk Liu <Monk.Liu@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c688c641
...@@ -443,7 +443,7 @@ void amdgpu_fence_driver_fini(struct amdgpu_device *adev) ...@@ -443,7 +443,7 @@ void amdgpu_fence_driver_fini(struct amdgpu_device *adev)
amd_sched_fini(&ring->sched); amd_sched_fini(&ring->sched);
del_timer_sync(&ring->fence_drv.fallback_timer); del_timer_sync(&ring->fence_drv.fallback_timer);
for (j = 0; j <= ring->fence_drv.num_fences_mask; ++j) for (j = 0; j <= ring->fence_drv.num_fences_mask; ++j)
fence_put(ring->fence_drv.fences[i]); fence_put(ring->fence_drv.fences[j]);
kfree(ring->fence_drv.fences); kfree(ring->fence_drv.fences);
ring->fence_drv.initialized = false; ring->fence_drv.initialized = false;
} }
......
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