Hello there,

Static analyser cppcheck says:

linux-6.1-rc4/drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c:626:27: 
style: Array index 'i' is used before limits check. [arrayIndexThenCheck]

Source code is

               if (dcfclk_sta_targets[i] < optimal_dcfclk_for_uclk[j] && i < 
num_dcfclk_sta_targets) {

It might be wise to move the limits check to before use.

Regards

David Binderman

Reply via email to