drm/amd/pm: fix uninitialized variable warning
authorjsg <jsg@openbsd.org>
Mon, 9 Sep 2024 08:31:19 +0000 (08:31 +0000)
committerjsg <jsg@openbsd.org>
Mon, 9 Sep 2024 08:31:19 +0000 (08:31 +0000)
From Jesse Zhang
fc0cb02efdfbf8f913417bb06ac16a1a985523e7 in linux-6.6.y/6.6.50
7c836905520703dbc8b938993b6d4d718bc739f3 in mainline linux

sys/dev/pci/drm/amd/pm/powerplay/amd_powerplay.c

index d5aebe1..68cc71e 100644 (file)
@@ -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;
 
        /*