drm/amd/display: Set initial value to a divider
authorMikita Lipski <mikita.lipski@amd.com>
Wed, 26 Aug 2020 12:00:42 +0000 (08:00 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Apr 2021 20:52:08 +0000 (16:52 -0400)
commit8532467cc9019fdff9d98cfeb68b6c3eb19eadf7
tree25672e93422654ed2a23bf7b5796cad5ad897fd6
parent712343cd21ea709ba63869f74246466524172ad4
drm/amd/display: Set initial value to a divider

[why/how]
Due to compiler optimization the values would be
passed to the division function uninitialized
causing a div by zero. Initialize the numerator
and denominator to 0 and 1 to prevent division
by zero.

Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c