Skip to content
Commit 2f6fd232 authored by Jeff LaBundy's avatar Jeff LaBundy Committed by Dmitry Torokhov
Browse files

Input: iqs7222 - protect against undefined slider size



Select variants of silicon do not define a default slider size, in
which case the size must be specified in the device tree. If it is
not, the axis's maximum value is reported as 65535 due to unsigned
integer overflow.

To solve this problem, move the existing zero-check outside of the
conditional block that checks whether the property is present.

Fixes: e505edae ("Input: add support for Azoteq IQS7222A/B/C")
Signed-off-by: default avatarJeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/Y1SRXEi7XMlncDWk@nixie71


Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 99d03b54
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