diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2016-12-28 07:14:44 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-01-27 11:13:00 -0500 |
commit | cd576e63d222c1d6307cec7cb185a64db2985ee8 (patch) | |
tree | 302974caf174a9cfe8678ae73218121e6d20826c /drivers/gpu | |
parent | 4c283acf69cf85f4e72c380b055a8fdba01d272e (diff) |
drm/amd/powerplay: fix memory leak in cz_hwmgr.c
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')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c index 14701772bec6..2f0638c6d41f 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | |||
@@ -1217,9 +1217,16 @@ static int cz_hwmgr_backend_init(struct pp_hwmgr *hwmgr) | |||
1217 | 1217 | ||
1218 | static int cz_hwmgr_backend_fini(struct pp_hwmgr *hwmgr) | 1218 | static int cz_hwmgr_backend_fini(struct pp_hwmgr *hwmgr) |
1219 | { | 1219 | { |
1220 | if (hwmgr != NULL && hwmgr->backend != NULL) | 1220 | if (hwmgr != NULL) { |
1221 | phm_destroy_table(hwmgr, &(hwmgr->enable_clock_power_gatings)); | ||
1222 | phm_destroy_table(hwmgr, &(hwmgr->set_power_state)); | ||
1223 | phm_destroy_table(hwmgr, &(hwmgr->enable_dynamic_state_management)); | ||
1224 | phm_destroy_table(hwmgr, &(hwmgr->disable_dynamic_state_management)); | ||
1225 | phm_destroy_table(hwmgr, &(hwmgr->power_down_asic)); | ||
1226 | phm_destroy_table(hwmgr, &(hwmgr->setup_asic)); | ||
1221 | kfree(hwmgr->backend); | 1227 | kfree(hwmgr->backend); |
1222 | 1228 | hwmgr->backend = NULL; | |
1229 | } | ||
1223 | return 0; | 1230 | return 0; |
1224 | } | 1231 | } |
1225 | 1232 | ||