diff options
| author | 2026-09-21 18:33:18 +0800 | |
|---|---|---|
| committer | 2026-10-01 12:05:03 -0400 | |
| commit | 63da68d6a2279ec945581c990c5a59a5ae8b5560 (patch) | |
| tree | 342937d4c12abf33dcc028e8895c3cab311f7d25 /scripts/Makefile.thinlto | |
| parent | drm/amdgpu: fix IP instance memory leak on kobject add failure (diff) | |
drm/amdgpu: fix ACP MFD device leak on init failure
acp_hw_init() registers ACP child devices with mfd_add_devices() before
attaching them to the ACP power domain and initializing the hardware.
If attaching a child to the power domain fails, or if the ACP reset or
clock enable operation times out, the failure path frees only the
source cell, resource, and platform-data allocations. The child
platform devices already registered by mfd_add_devices() remain
registered and are never released.
Remove the children from the power domain and unregister the MFD
devices on failures that occur after mfd_add_devices() succeeds. Keep
mfd_add_devices() failures on the existing cleanup path since the MFD
core already rolls back partially registered children itself.
The issue was identified by a static analysis tool I developed and
confirmed by manual review.
Fixes: 25030321ba28 ("drm/amd: add pm domain for ACP IP sub blocks")
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
