Files
linux/drivers/gpu/drm/amd/amdgpu
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
..
2017-12-04 16:33:12 -05:00
2017-07-14 11:06:10 -04:00
2015-06-03 21:03:15 -04:00
2017-10-20 13:28:44 -04:00
2015-06-03 21:03:15 -04:00
2017-09-28 16:03:30 -04:00
2017-09-28 16:03:30 -04:00
2017-09-26 15:14:22 -04:00
2017-09-26 17:01:32 -04:00
2015-06-03 21:03:17 -04:00
2017-09-26 15:14:22 -04:00
2016-08-31 15:21:09 -04:00
2017-05-24 17:41:17 -04:00
2017-12-06 12:47:22 -05:00
2017-12-06 12:47:22 -05:00
2017-12-06 12:47:22 -05:00
2017-12-06 12:47:22 -05:00