Acked-by: Alex Deucher <[email protected]>

________________________________
From: amd-gfx <[email protected]> on behalf of Evan Quan 
<[email protected]>
Sent: Friday, December 29, 2017 2:44:39 AM
To: [email protected]
Cc: Quan, Evan
Subject: [PATCH 4/4] drm/amd/powerplay: set pp_num_states as 0 on error 
situation

Change-Id: Ia27af812631666d2c9d54da156fd3451bd738d4b
Signed-off-by: Evan Quan <[email protected]>
---
 drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c 
b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index f3888dd..684828a 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -726,6 +726,8 @@ static int pp_dpm_get_pp_num_states(void *handle,
         struct pp_instance *pp_handle = (struct pp_instance *)handle;
         int ret = 0;

+       memset(data, 0, sizeof(*data));
+
         ret = pp_check(pp_handle);

         if (ret)
--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to