diff options
author | Hamza Mahfooz <hamza.mahfooz@amd.com> | 2023-09-05 20:27:22 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-09-19 13:28:06 +0300 |
commit | ff536a96687cf976d89bed08d40fcaae6bf50304 (patch) | |
tree | f6c4fa7212a65e2cc7e37f72aaed1655f3e84976 /sound | |
parent | e1769b1dfcaebb7e4272528fa2f198c6549f619b (diff) | |
download | linux-ff536a96687cf976d89bed08d40fcaae6bf50304.tar.xz |
drm/amd/display: prevent potential division by zero errors
commit 07e388aab042774f284a2ad75a70a194517cdad4 upstream.
There are two places in apply_below_the_range() where it's possible for
a divide by zero error to occur. So, to fix this make sure the divisor
is non-zero before attempting the computation in both cases.
Cc: stable@vger.kernel.org
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2637
Fixes: a463b263032f ("drm/amd/display: Fix frames_to_insert math")
Fixes: ded6119e825a ("drm/amd/display: Reinstate LFC optimization")
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions