diff options
author | Alex Hung <alex.hung@amd.com> | 2024-07-17 09:17:56 -0600 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-07-27 17:34:20 -0400 |
commit | a15268787b79fd183dd526cc16bec9af4f4e49a1 (patch) | |
tree | 08adfa5eb6b14174a391315b0502c0ae2914899d /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | cead9ac8b0992ae2659b637e86a0da7cfeb5e267 (diff) | |
download | linux-a15268787b79fd183dd526cc16bec9af4f4e49a1.tar.gz linux-a15268787b79fd183dd526cc16bec9af4f4e49a1.tar.bz2 linux-a15268787b79fd183dd526cc16bec9af4f4e49a1.zip |
drm/amd/display: Avoid overflow assignment in link_dp_cts
sampling_rate is an uint8_t but is assigned an unsigned int, and thus it
can overflow. As a result, sampling_rate is changed to uint32_t.
Similarly, LINK_QUAL_PATTERN_SET has a size of 2 bits, and it should
only be assigned to a value less or equal than 4.
This fixes 2 INTEGER_OVERFLOW issues reported by Coverity.
Signed-off-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
0 files changed, 0 insertions, 0 deletions