[PATCH 4/4] drm/amd/powerplay: set pp_num_states as 0 on error situation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Acked-by: Alex Deucher <alexander.deucher at amd.com>

________________________________
From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> on behalf of Evan Quan <evan.quan at amd.com>
Sent: Friday, December 29, 2017 2:44:39 AM
To: amd-gfx at lists.freedesktop.org
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 <evan.quan at amd.com>
---
 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
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20171230/396a2260/attachment.html>


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux