Commit d799a783 authored by Dinghao Liu's avatar Dinghao Liu Committed by Zheng Zengkai
Browse files

drm/amd/pm: fix a memleak in aldebaran_tables_init

stable inclusion
from stable-v6.6.5
commit 6832e5396d68c182871447d438af259d08ee7d36
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8N21P

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6832e5396d68c182871447d438af259d08ee7d36



--------------------------------

[ Upstream commit 7a88f23e768491bae653b444a96091d2aaeb0818 ]

When kzalloc() for smu_table->ecc_table fails, we should free
the previously allocated resources to prevent memleak.

Fixes: edd79420 ("drm/amd/pm: add message smu to get ecc_table v2")
Signed-off-by: default avatarDinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent f672c68c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment