]> 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)
commit5b543124928cd588540dd8d0a5ecad1cef222291
tree1fe522fdc441e2f4e86faec6414d796b10e7c00b
parent56e87ab79e4d14c0c0c27e5858c1c6902e0d24d5
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