aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.c
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2021-07-03 09:44:12 +0000
committerAlex Deucher <[email protected]>2021-07-08 19:17:02 +0000
commit3006c9245542609d3a11b856b6d17cfce747ca88 (patch)
tree4688a9063d943a7c3eadcae40de20ccb75676afa /drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.c
parentdrm/amd/display: increase max EDID size to 2k (diff)
downloadkernel-3006c9245542609d3a11b856b6d17cfce747ca88.tar.gz
kernel-3006c9245542609d3a11b856b6d17cfce747ca88.zip
drm/amdgpu: fix a signedness bug in __verify_ras_table_checksum()
If amdgpu_eeprom_read() returns a negative error code then the error handling checks: if (res < buf_size) { The problem is that "buf_size" is a u32 so negative values are type promoted to a high positive values and the condition is false. Fix this by changing the type of "buf_size" to int. Fixes: 63d4c081a556a1 ("drm/amdgpu: Optimize EEPROM RAS table I/O") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Luben Tuikov <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.c')
0 files changed, 0 insertions, 0 deletions