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 Change-Id: I15878ccb6a39848b764844e45f2ac375164906ad Signed-off-by: Hawking Zhang <Hawking.Zhang at amd.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c index 4e7bb78..f61da66 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c @@ -670,6 +670,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; -- 2.7.4