[PATCH 1/3] drm/amdgpu: fix uninitialized variable warning for sdma_v7
Tim Huang
Tim.Huang at amd.com
Mon May 6 06:12:05 UTC 2024
Clear warning that using uninitialized variable index.
Signed-off-by: Tim Huang <Tim.Huang at amd.com>
---
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c
index 35d99a4afe83..0b5af1c50461 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c
@@ -876,7 +876,8 @@ static int sdma_v7_0_ring_test_ring(struct amdgpu_ring *ring)
r = amdgpu_ring_alloc(ring, 5);
if (r) {
DRM_ERROR("amdgpu: dma failed to lock ring %d (%d).\n", ring->idx, r);
- amdgpu_device_wb_free(adev, index);
+ if (!ring->is_mes_queue)
+ amdgpu_device_wb_free(adev, index);
return r;
}
--
2.39.2
More information about the amd-gfx
mailing list