]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/amd/display: Check if modulo is 0 before dividing.
authorDavid Galiffi <David.Galiffi@amd.com>
Tue, 3 May 2022 22:30:25 +0000 (18:30 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 26 May 2022 18:56:30 +0000 (14:56 -0400)
commit49947b906a6bd9668eaf4f9cf691973c25c26955
treedc384cadea60b725a592594b8477e04a68ef43c3
parent3f69ee66f507a9e1180fd3a67b43807fae9b0e37
drm/amd/display: Check if modulo is 0 before dividing.

[How & Why]
If a value of 0 is read, then this will cause a divide-by-0 panic.

Reviewed-by: Martin Leung <Martin.Leung@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: David Galiffi <David.Galiffi@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c