Commit 139b0282 authored by Wei Chen's avatar Wei Chen Committed by openeuler-sync-bot
Browse files

fbdev: lxfb: Fix potential divide by zero

stable inclusion
from stable-v5.10.177
commit ce5551db36294764bdbda7d2bf794d13d5dd352c
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I88YNP

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ce5551db36294764bdbda7d2bf794d13d5dd352c



--------------------------------

[ Upstream commit 61ac4b86 ]

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: default avatarWei Chen <harperchen1110@gmail.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
(cherry picked from commit 23a2a09c)
parent c5542a02
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment