+++ /dev/null
-From 05fe29bbcb5dc12f806196de7d350eb44c8d2639 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 23 Nov 2023 15:33:22 +0800
-Subject: drm/amd/pm: fix a memleak in aldebaran_tables_init
-
-From: Dinghao Liu <dinghao.liu@zju.edu.cn>
-
-[ Upstream commit 7a88f23e768491bae653b444a96091d2aaeb0818 ]
-
-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>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
-index d30ec3005ea19..cd8b0ab0112ae 100644
---- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
-+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
-@@ -258,8 +258,11 @@ static int aldebaran_tables_init(struct smu_context *smu)
- }
-
- smu_table->ecc_table = kzalloc(tables[SMU_TABLE_ECCINFO].size, GFP_KERNEL);
-- if (!smu_table->ecc_table)
-+ if (!smu_table->ecc_table) {
-+ kfree(smu_table->metrics_table);
-+ kfree(smu_table->gpu_metrics_table);
- return -ENOMEM;
-+ }
-
- return 0;
- }
---
-2.42.0
-
iommu-vt-d-disable-pci-ats-in-legacy-passthrough-mod.patch
iommu-vt-d-make-context-clearing-consistent-with-con.patch
drm-amd-pm-fix-a-memleak-in-aldebaran_tables_init.patch
-drm-amd-pm-fix-a-memleak-in-aldebaran_tables_init.patch-16085
mmc-core-add-helpers-mmc_regulator_enable-disable_vq.patch
mmc-sdhci-sprd-fix-vqmmc-not-shutting-down-after-the.patch
drm-amd-display-expand-kernel-doc-for-dc.patch