projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb5df31
)
drm/amd/amdgpu: Allow calling si_dpm_fini at any point
author
Tom St Denis
<
[email protected]
>
Tue, 6 Sep 2016 13:42:55 +0000
(09:42 -0400)
committer
Alex Deucher
<
[email protected]
>
Mon, 12 Sep 2016 22:12:20 +0000
(18:12 -0400)
Allow calling fini even if ps array is not allocated.
Signed-off-by: Tom St Denis <
[email protected]
>
Reviewed-by: Edward O'Callaghan <
[email protected]
>
Reviewed-by: Huang Rui <
[email protected]
>
Reviewed-by: Alex Deucher <
[email protected]
>
Signed-off-by: Alex Deucher <
[email protected]
>
drivers/gpu/drm/amd/amdgpu/si_dpm.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
index e90bb4423cc7b72e844dd1a85a51bca1161f54c1..2a72b2b5801d983ece092890c879677654c16678 100644
(file)
--- 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)
{
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);