summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Zhang <jesse.zhang@amd.com>2024-04-28 15:36:26 +0800
committerAlex Deucher <alexander.deucher@amd.com>2024-04-30 09:59:26 -0400
commit7c836905520703dbc8b938993b6d4d718bc739f3 (patch)
treef9df9aafe791b8977e5d5f4b1089c753f2d704b6
parent579f0c21baec9e7506b6bb3f60f0a9b6d07693b4 (diff)
downloadlinux-next-7c836905520703dbc8b938993b6d4d718bc739f3.tar.gz
linux-next-7c836905520703dbc8b938993b6d4d718bc739f3.zip
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: Jesse Zhang <Jesse.Zhang@amd.com> Reviewed-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Tim Huang <Tim.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c
index 5fb21a0508cd..1c40a362d5ab 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c
@@ -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;
/*