diff options
author | Tom St Denis <tom.stdenis@amd.com> | 2016-09-06 09:42:55 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-09-12 18:12:20 -0400 |
commit | 9623e4bfaa5e78727cae5c19b9ee5f94cf6bb24a (patch) | |
tree | 2b6936d6c89fa0c65b56c1602e2b6db1881d680b /drivers | |
parent | cb5df31b2d218a0a01952f9551f114b1bc32064c (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/si_dpm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c index e90bb4423cc7..2a72b2b5801d 100644 --- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c | |||
@@ -7519,9 +7519,9 @@ static void si_dpm_fini(struct amdgpu_device *adev) | |||
7519 | { | 7519 | { |
7520 | int i; | 7520 | int i; |
7521 | 7521 | ||
7522 | for (i = 0; i < adev->pm.dpm.num_ps; i++) { | 7522 | if (adev->pm.dpm.ps) |
7523 | kfree(adev->pm.dpm.ps[i].ps_priv); | 7523 | for (i = 0; i < adev->pm.dpm.num_ps; i++) |
7524 | } | 7524 | kfree(adev->pm.dpm.ps[i].ps_priv); |
7525 | kfree(adev->pm.dpm.ps); | 7525 | kfree(adev->pm.dpm.ps); |
7526 | kfree(adev->pm.dpm.priv); | 7526 | kfree(adev->pm.dpm.priv); |
7527 | kfree(adev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries); | 7527 | kfree(adev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries); |