summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2026-07-07 13:53:26 -0400
committerAlex Deucher <alexander.deucher@amd.com>2026-07-14 19:12:34 -0400
commitc8a1066ccc9130edcbd2f092231cb71e283abdf5 (patch)
tree5402d11933fa5f4ac67523cd1a6d79d228ed9647 /drivers
parentb3f2f83e84b88a04efbfb63f7b9e0ac20ab64103 (diff)
downloadlinux-next-c8a1066ccc9130edcbd2f092231cb71e283abdf5.tar.gz
linux-next-c8a1066ccc9130edcbd2f092231cb71e283abdf5.zip
drm/amdgpu/gfx9: 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 556e5cb3f4cd..1cad6dc9476e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -2442,12 +2442,12 @@ static int gfx_v9_0_sw_init(struct amdgpu_ip_block *ip_block)
return -EINVAL;
}
- gfx_v9_0_alloc_ip_dump(adev);
-
r = amdgpu_gfx_sysfs_init(adev);
if (r)
return r;
+ gfx_v9_0_alloc_ip_dump(adev);
+
return 0;
}