]> git.itanic.dy.fi Git - linux-stable/commit
drm/amd/pm: fix a memleak in aldebaran_tables_init
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Thu, 23 Nov 2023 07:33:22 +0000 (15:33 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 29 Nov 2023 23:09:14 +0000 (18:09 -0500)
commit7a88f23e768491bae653b444a96091d2aaeb0818
tree08e420c9ae4d961c19e87897d4fca0c888adf030
parente222b36e9649404cc0770a6d778d69cf73bcd440
drm/amd/pm: fix a memleak in aldebaran_tables_init

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

Fixes: edd794208555 ("drm/amd/pm: add message smu to get ecc_table v2")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c