drm/amdgpu: Fix memory leak of i2s_pdata in ACP initialization
authorCe Sun <cesun102@amd.com>
Tue, 12 May 2026 01:53:21 +0000 (09:53 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 May 2026 15:51:39 +0000 (11:51 -0400)
commite57f79cc4482b86d312e532e67ad3f576d51712d
tree891fecdce2a770c36725d48eea3cc2318b882992
parente20ea411c99f6968af35fd03e9ee21f70d799144
drm/amdgpu: Fix memory leak of i2s_pdata in ACP initialization

Currently, the i2s_pdata structure is dynamically allocated in
acp_hw_init() but never freed in both the error handling path and
the acp_hw_fini() cleanup path, causing a permanent memory leak.

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
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.h