From 29830895a38a41dd013f4424b9481ceb5e6ab681 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 9 Sep 2024 08:35:23 +0000 Subject: [PATCH] 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 --- sys/dev/pci/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 = -- 2.20.1