]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: sun6i-p2wi: Prevent potential division by zero
authorAxel Lin <axel.lin@ingics.com>
Wed, 13 Apr 2016 00:54:30 +0000 (08:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 16:56:20 +0000 (16:56 +0000)
commitf7f3bdb225e3ff9116d983fe3e02bb9acca10855
treee596fa4af47d605790b20ad9b9706ea4ee3f361f
parentd23ad76f240c0f597b7a9eb79905d246f27d40df
i2c: sun6i-p2wi: Prevent potential division by zero

[ Upstream commit 5ac61d26b8baff5b2e5a9f3dc1ef63297e4b53e7 ]

Make sure we don't OOPS in case clock-frequency is set to 0 in a DT. The
variable set here is later used as a divisor.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-sun6i-p2wi.c