]> git.baikalelectronics.ru Git - kernel.git/commit
fbdev: lxfb: Fix potential divide by zero
authorWei Chen <harperchen1110@gmail.com>
Wed, 15 Mar 2023 09:05:18 +0000 (09:05 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Apr 2023 09:16:43 +0000 (11:16 +0200)
commite097c0e66bd73e3976fa9f7555aa404e5a7616da
treeb426b24d49b2ecdf95e3d558b06d12334443f501
parente0447380961c9400d3a6ebb501b1f6c6247fb79a
fbdev: lxfb: Fix potential divide by zero

[ Upstream commit 61ac4b86a4c047c20d5cb423ddd87496f14d9868 ]

var->pixclock can be assigned to zero by user. Without proper
check, divide by zero would occur in lx_set_clock.

Error out if var->pixclock is zero.

Signed-off-by: Wei Chen <harperchen1110@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/video/fbdev/geode/lxfb_core.c