struct smumgr/hwmgr will be freed on amd_powerplay_destory
and if we free them in one of asic private functions, other private
date may not be freed. for example: power state and power table
in hwmgr.
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>
static int cz_hwmgr_backend_fini(struct pp_hwmgr *hwmgr)
{
- if (hwmgr != NULL && hwmgr->backend != NULL) {
+ if (hwmgr != NULL && hwmgr->backend != NULL)
kfree(hwmgr->backend);
- kfree(hwmgr);
- }
+
return 0;
}
cgs_free_gpu_mem(smumgr->device,
cz_smu->smu_buffer.handle);
kfree(cz_smu);
- kfree(smumgr);
}
return 0;