]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display: Check denominator crb_pipes before used
authorAlex Hung <alex.hung@amd.com>
Tue, 18 Jun 2024 22:19:48 +0000 (16:19 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Apr 2025 08:06:36 +0000 (10:06 +0200)
commitb9264aa24f628eba5779d1c916441e0cedde9b3d
tree7a52ee02243579a4f767718f30913dd76fb06ef2
parentad0410346cc4edd76e7e51b5eb8f5cc795d5a0bc
drm/amd/display: Check denominator crb_pipes before used

commit ea79068d4073bf303f8203f2625af7d9185a1bc6 upstream.

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

This fixes 2 DIVIDE_BY_ZERO issues 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>
Signed-off-by: Cliff Liu <donghua.liu@windriver.com>
Signed-off-by: He Zhe <Zhe.He@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c