Skip to content
Snippets Groups Projects
Commit 1c65f8f9 authored by Rafael Mendonca's avatar Rafael Mendonca Committed by Greg Kroah-Hartman
Browse files

drm/amdgpu/powerplay/psm: Fix memory leak in power state init


[ Upstream commit 8f8033d5 ]

Commit 902bc65d ("drm/amdgpu/powerplay/psm: return an error in power
state init") made the power state init function return early in case of
failure to get an entry from the powerplay table, but it missed to clean up
the allocated memory for the current power state before returning.

Fixes: 902bc65d ("drm/amdgpu/powerplay/psm: return an error in power state init")
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarRafael Mendonca <rafaelmendsr@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 9ccd1171
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment