Skip to content
Commit 1a5ba478 authored by Oleksij Rempel's avatar Oleksij Rempel Committed by Greg Kroah-Hartman
Browse files

Input: resistive-adc-touch - fix division by zero error on z1 == 0



commit fe0a7e3d upstream.

For proper pressure calculation we need at least x and z1 to be non
zero. Even worse, in case z1 we may run in to division by zero
error.

Fixes: 60b7db91 ("Input: resistive-adc-touch - rework mapping of channels")
Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/r/20211007095727.29579-1-o.rempel@pengutronix.de


Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6ad4dc96
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment