Skip to content

Commit

Permalink
drm/amd/powerplay: set pp_num_states as 0 on error situation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Evan Quan authored and Alex Deucher committed Jan 10, 2018
1 parent 40b4667 commit 4dbda35
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/amd/powerplay/amd_powerplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4dbda35

Please sign in to comment.