linux/drivers/gpu
Ernst Sjöstrand 47e8788b49 drm/amd/powerplay: Fix buffer overflows with mc_reg_address
Smatch warned about the following lines:
ci_set_mc_special_registers() error: buffer overflow 'table->mc_reg_address' 16 <= 16
tonga_set_mc_special_registers() error: buffer overflow 'table->mc_reg_address' 16 <= 16

Change the logic to check before access instead of after incrementing.
It's fine if j reaches max after we're done. This allows the last entry
of the array to be filled without an error message for example.
Changed some whitespace to clarify grouping.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Ernst Sjöstrand <ernstp@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-12-06 12:48:00 -05:00
..
drm drm/amd/powerplay: Fix buffer overflows with mc_reg_address 2017-12-06 12:48:00 -05:00
host1x main drm pull request for v4.15 2017-11-15 20:42:10 -08:00
ipu-v3 fixes/cleanups for rc1, non-desktop flags for VR 2017-11-23 21:04:56 -10:00
vga vgaarb: Factor out EFI and fallback default device selection 2017-10-18 10:04:56 +02:00
Makefile