]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdgpu: fix resource leak on ACP reset timeout
authorCe Sun <cesun102@amd.com>
Mon, 22 Jun 2026 15:05:09 +0000 (23:05 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2026 17:00:19 +0000 (13:00 -0400)
commit020da7c5aac5b86bad8a1571f6eda6b8cff9331d
treedd4eeb84f3bf5da2112164640984ded789bdd0e9
parenta609b6278bf3cde17eeee6620091465521e4b02c
drm/amdgpu: fix resource leak on ACP reset timeout

When ACP soft reset poll times out, original code returns early without cleanup,
leaking MFD child devices, genpd links and all ACP heap allocations.

Replace direct early return with goto out to force run all cleanup logic
regardless of reset success, preserve timeout error code for caller.

Signed-off-by: Ce Sun <cesun102@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 98073e4328d7a8d75d03696ab27f6de70ef1aeda)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c