Skip to content
Commit 2cc4a591 authored by Alexey Kodanev's avatar Alexey Kodanev Committed by Alex Deucher
Browse files

drm/amd/pm: vega10_hwmgr: fix potential off-by-one overflow in 'performance_levels'



Since 'hardwareActivityPerformanceLevels' is set to the size of the
'performance_levels' array in vega10_hwmgr_backend_init(), using the
'<=' assertion to check for the next index value is incorrect.
Replace it with '<'.

Detected using the static analysis tool - Svace.
Fixes: f83a9991 ("drm/amd/powerplay: add Vega10 powerplay support (v5)")
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarAlexey Kodanev <aleksei.kodanev@bell-sw.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a98cec22
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment