diff options
author | Evan Quan <evan.quan@amd.com> | 2017-12-28 14:37:58 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-01-10 15:44:52 -0500 |
commit | 4dbda35ffaa3eb52ecf960b56220644158ddae12 (patch) | |
tree | 151d610a9317bfc1d3977619dd4d9787915ee802 /drivers/gpu/drm/amd | |
parent | 40b4667babaf73218e62cd73a17184a7c2d50434 (diff) | |
download | linux-4dbda35ffaa3eb52ecf960b56220644158ddae12.tar.bz2 |
drm/amd/powerplay: set pp_num_states as 0 on error situation
Signed-off-by: Evan Quan <evan.quan@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c index fa9d1615a2cc..4c3223a4d62b 100644 --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c @@ -718,6 +718,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) |