diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-09-09 08:35:24 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-09-09 08:35:24 +0000 |
commit | 979a1b4f3d7a63d1d1739d993ba1863ff0c7fb84 (patch) | |
tree | 3d0e352f0a3b6f83cdf02d88de52b9f1a9cb160d /sys/dev/pci | |
parent | f4667df0c135796436177ab2d11a97df676f18b4 (diff) |
drm/amd/pm: fix warning using uninitialized value of max_vid_step
From Jesse Zhang
59dd0d4b33269c5173c648cb2c62f9649618e766 in linux-6.6.y/6.6.50
17e3bea65cdc453695b2fe4ff26d25d17f5339e9 in mainline linux
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c b/sys/dev/pci/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c index 19a468e034c..c3eecc283f6 100644 --- a/sys/dev/pci/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c +++ b/sys/dev/pci/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c @@ -2571,8 +2571,11 @@ static int vega10_init_smc_table(struct pp_hwmgr *hwmgr) } } - pp_atomfwctrl_get_voltage_table_v4(hwmgr, VOLTAGE_TYPE_VDDC, + result = pp_atomfwctrl_get_voltage_table_v4(hwmgr, VOLTAGE_TYPE_VDDC, VOLTAGE_OBJ_SVID2, &voltage_table); + PP_ASSERT_WITH_CODE(!result, + "Failed to get voltage table!", + return result); pp_table->MaxVidStep = voltage_table.max_vid_step; pp_table->GfxDpmVoltageMode = |