drm/amd/display: Fix memory leak
BugLink: https://bugs.launchpad.net/bugs/1969107
[ 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>
(cherry picked from commit
7e10369c72db7a0e2f77b2e306aadc07aef6b07a)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>