mirror of https://gitee.com/openkylin/linux.git
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:
parent
40b4667bab
commit
4dbda35ffa
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue