Commit 7c836905 authored by Jesse Zhang's avatar Jesse Zhang Committed by Alex Deucher

drm/amd/pm: fix uninitialized variable warning

Check the return of function smum_send_msg_to_smc
as it may fail to initialize the variable.
Signed-off-by: default avatarJesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: default avatarYang Wang <kevinyang.wang@amd.com>
Reviewed-by: default avatarTim Huang <Tim.Huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 579f0c21
......@@ -99,7 +99,7 @@ static void pp_swctf_delayed_work_handler(struct work_struct *work)
struct amdgpu_device *adev = hwmgr->adev;
struct amdgpu_dpm_thermal *range =
&adev->pm.dpm.thermal;
uint32_t gpu_temperature, size;
uint32_t gpu_temperature, size = sizeof(gpu_temperature);
int ret;
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment