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>
This commit is contained in:
Evan Quan 2017-12-28 14:37:58 +08:00 committed by Alex Deucher
parent 40b4667bab
commit 4dbda35ffa
1 changed files with 2 additions and 0 deletions

View File

@ -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)