From: jsg Date: Mon, 9 Sep 2024 09:00:17 +0000 (+0000) Subject: drm/amd/display: Fix Coverity INTEGER_OVERFLOW within decide_fallback_link_setting_ma... X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=223108ef13d2af701b23405abceeb6d08b796faf;p=openbsd drm/amd/display: Fix Coverity INTEGER_OVERFLOW within decide_fallback_link_setting_max_bw_policy From Hersen Wu 94b0689984dd6a9e9f2303a1510333d18204ba88 in linux-6.6.y/6.6.50 83c0c8361347cf43937348e8ca0a487679c003ae in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_capability.c b/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_capability.c index 5101c905423..be8da8bbd96 100644 --- a/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_capability.c +++ b/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_capability.c @@ -528,7 +528,7 @@ static bool decide_fallback_link_setting_max_bw_policy( struct dc_link_settings *cur, enum link_training_result training_result) { - uint8_t cur_idx = 0, next_idx; + uint32_t cur_idx = 0, next_idx; bool found = false; if (training_result == LINK_TRAINING_ABORT)