From: jsg Date: Mon, 9 Sep 2024 08:35:23 +0000 (+0000) Subject: drm/amd/pm: fix warning using uninitialized value of max_vid_step X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=29830895a38a41dd013f4424b9481ceb5e6ab681;p=openbsd 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 --- 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 =