]> git.hungrycats.org Git - linux/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 15:22:09 +0000 (11:22 -0400)
commit98073e4328d7a8d75d03696ab27f6de70ef1aeda
treeeba7224de51f812e6d5e056ea8e490f7807a45ff
parenta71d2b051f334d1f36ba113bcd8dab69fbb37212
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c