summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorAlex Hung <alex.hung@amd.com>2024-07-17 18:17:56 +0300
committerAlex Deucher <alexander.deucher@amd.com>2024-07-28 00:34:20 +0300
commita15268787b79fd183dd526cc16bec9af4f4e49a1 (patch)
tree08adfa5eb6b14174a391315b0502c0ae2914899d /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parentcead9ac8b0992ae2659b637e86a0da7cfeb5e267 (diff)
downloadlinux-a15268787b79fd183dd526cc16bec9af4f4e49a1.tar.xz
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