]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: fail instead of div by zero/bugcheck
authorAshley Thomas <Ashley.Thomas2@amd.com>
Tue, 13 Oct 2020 04:33:27 +0000 (21:33 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 2 Nov 2020 20:30:47 +0000 (15:30 -0500)
commit0ff61e1eef235bf67c6395e14ab37b8982a9d466
tree1fe522fdc441e2f4e86faec6414d796b10e7c00b
parente00f79134e6c1f19096b411bd407354bd32bb731
drm/amd/display: fail instead of div by zero/bugcheck

[why]
If pbn_per_slot is 0, fail instead of dividing by zero and
bugchecking.

[how]
Check for zero divisor before division operation.

Signed-off-by: Ashley Thomas <Ashley.Thomas2@amd.com>
Reviewed-by: Wyatt Wood <Wyatt.Wood@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_debug.c
drivers/gpu/drm/amd/display/dc/core/dc_link.c
drivers/gpu/drm/amd/display/dc/inc/core_status.h