dcn321_fpu.c:626: Array index check in wrong place ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux