aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2016-12-28 20:15:45 +0800
committerAlex Deucher <alexander.deucher@amd.com>2017-01-27 11:13:01 -0500
commita0aa70463e49ed9069c402d7907bba892dd8ef7f (patch)
tree6abeac2df267e5b301cb4f22160a5b47bd66a1c0 /drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c
parentdrm/amd/powerplay: fix memory leak in cz_hwmgr.c (diff)
downloadlinux-dev-a0aa70463e49ed9069c402d7907bba892dd8ef7f.tar.xz
linux-dev-a0aa70463e49ed9069c402d7907bba892dd8ef7f.zip
drm/amd/powerplay: fix memory leak in smu7_hwmgr
add pp_smu7_thermal_fini function to free related data when smu7_hwmgr_fini. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c
index a0e4adee9325..436ca5ce8248 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c
@@ -575,3 +575,9 @@ int pp_smu7_thermal_initialize(struct pp_hwmgr *hwmgr)
return result;
}
+void pp_smu7_thermal_fini(struct pp_hwmgr *hwmgr)
+{
+ phm_destroy_table(hwmgr, &(hwmgr->set_temperature_range));
+ phm_destroy_table(hwmgr, &(hwmgr->start_thermal_controller));
+ return;
+} \ No newline at end of file