]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/amd/display: Check denominator pbn_div before used
authorAlex Hung <alex.hung@amd.com>
Tue, 18 Jun 2024 22:21:20 +0000 (16:21 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 1 Jul 2024 20:06:53 +0000 (16:06 -0400)
commit116a678f3a9abc24f5c9d2525b7393d18d9eb58e
tree5cdcafb0f72ce7a833f411fd48367183c85db6d1
parentcbe9d7c1d25ef6da67c9bf19eb02760632857f13
drm/amd/display: Check denominator pbn_div before used

[WHAT & HOW]
A denominator cannot be 0, and is checked before used.

This fixes 1 DIVIDE_BY_ZERO issue reported by Coverity.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Jerry Zuo <jerry.zuo@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c