提交 95ef1f53 编写于 作者: H Hawking Zhang 提交者: Alex Deucher

drm/amd/powerplay: fix memory leak in rv_hwmgr backend

vddc_dep_on_dal_pwrl and vq_budgeting_table are allocated and initialized
in rv_hwmgr_backend_init. Thus free the memory in rv_hwmgr_backend_fini
Signed-off-by: NHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 dd4e2237
......@@ -656,6 +656,16 @@ static int rv_hwmgr_backend_fini(struct pp_hwmgr *hwmgr)
pinfo->vdd_dep_on_phyclk = NULL;
}
if (NULL != hwmgr->dyn_state.vddc_dep_on_dal_pwrl) {
kfree(hwmgr->dyn_state.vddc_dep_on_dal_pwrl);
hwmgr->dyn_state.vddc_dep_on_dal_pwrl = NULL;
}
if (NULL != hwmgr->dyn_state.vq_budgeting_table) {
kfree(hwmgr->dyn_state.vq_budgeting_table);
hwmgr->dyn_state.vq_budgeting_table = NULL;
}
kfree(hwmgr->backend);
hwmgr->backend = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册