1
0
Fork 0

drm/amd/amdgpu: Allow calling si_dpm_fini at any point

Allow calling fini even if ps array is not allocated.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
steinar/wifi_calib_4_9_kernel
Tom St Denis 2016-09-06 09:42:55 -04:00 committed by Alex Deucher
parent cb5df31b2d
commit 9623e4bfaa
1 changed files with 3 additions and 3 deletions

View File

@ -7519,9 +7519,9 @@ static void si_dpm_fini(struct amdgpu_device *adev)
{
int i;
for (i = 0; i < adev->pm.dpm.num_ps; i++) {
kfree(adev->pm.dpm.ps[i].ps_priv);
}
if (adev->pm.dpm.ps)
for (i = 0; i < adev->pm.dpm.num_ps; i++)
kfree(adev->pm.dpm.ps[i].ps_priv);
kfree(adev->pm.dpm.ps);
kfree(adev->pm.dpm.priv);
kfree(adev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries);