drm/amd/pm: Fix a potential gpu_metrics_table memory leak
authorZhen Ni <nizhen@uniontech.com>
Wed, 3 Aug 2022 09:19:59 +0000 (17:19 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Aug 2022 19:41:23 +0000 (15:41 -0400)
commit541d54e40f1672dea6514ad64d54d61ed952648e
treecb26999d5bebb622847091e4860391adeb95c8eb
parent5afb76522a0af0513b6dc01f84128a73206b051b
drm/amd/pm: Fix a potential gpu_metrics_table memory leak

Memory is allocated for gpu_metrics_table in
smu_v13_0_5_init_smc_tables(), but not freed in
smu_v13_0_5_fini_smc_tables(). This may cause memory leaks, fix it.

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Zhen Ni <nizhen@uniontech.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c