drm/amdgpu/gfx12: fix IP dump alloc ordering

If gfx sysfs init fails, we may leak the ip dump
allocations.

Reviewed-by: Mukul Joshi <mukul.joshi@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Alex Deucher 2026-07-07 13:55:25 -04:00
parent 601f7a1180
commit 4ef3723193

View File

@ -1597,12 +1597,12 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block)
if (r)
return r;
gfx_v12_0_alloc_ip_dump(adev);
r = amdgpu_gfx_sysfs_init(adev);
if (r)
return r;
gfx_v12_0_alloc_ip_dump(adev);
adev->gfx.me.use_mmio_for_reset = false;
adev->gfx.mec.use_mmio_for_reset = true;