drm/amd/pm: fix warning using uninitialized value of max_vid_step
[ Upstream commit 17e3bea65cdc453695b2fe4ff26d25d17f5339e9 ] Check the return of pp_atomfwctrl_get_Voltage_table_v4 as it may fail to initialize max_vid_step V2: change the check condition (Tim Huang) Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com> Reviewed-by: Tim Huang <Tim.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a601129c78
commit
d592768c17
@ -2572,8 +2572,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 =
|
||||
|
Loading…
Reference in New Issue
Block a user