drm/amd/display: Fix memory leak
authorYongzhi Liu <lyz_cs@pku.edu.cn>
Fri, 21 Jan 2022 11:26:13 +0000 (11:26 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 18:59:01 +0000 (20:59 +0200)
commit7e10369c72db7a0e2f77b2e306aadc07aef6b07a
tree047aa845a2dc4d6c30d8932ffdf1a61f06fbe7af
parent3edd8646cb7c11b57c90e026bda6f21076223f5b
drm/amd/display: Fix memory leak

[ Upstream commit 5d5c6dba2b43e28845d7d7ed32a36802329a5f52 ]

[why]
Resource release is needed on the error handling path
to prevent memory leak.

[how]
Fix this by adding kfree on the error handling path.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Yongzhi Liu <lyz_cs@pku.edu.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c