Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/amd/powerplay: initialize a variable before using it
Function vega10_apply_state_adjust_rules() only initializes stable_pstate_sclk_dpm_percentage when data->registry_data.stable_pstate_sclk_dpm_percentage is not between 1 and 100. The variable is then used to compute stable_pstate_sclk, which therefore uses an uninitialized value. Fix this by initializing stable_pstate_sclk_dpm_percentage to data->registry_data.stable_pstate_sclk_dpm_percentage. This issue has been found while building the kernel with clang. The compiler reported a -Wsometimes-uninitialized warning. Reviewed-by: Alex Deucher <[email protected]> Fixes: f83a999 ("drm/amd/powerplay: add Vega10 powerplay support (v5)") Signed-off-by: Nicolas Iooss <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
- Loading branch information