diff options
author | Jeff LaBundy <jeff@labundy.com> | 2022-09-09 00:24:24 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-09-14 13:08:49 +0300 |
commit | 514c13b1faed74e9bc19061b6d7c78d53a3402ba (patch) | |
tree | 8efafdb71c42b39dcdbbc3cab3b4b976b5ad0c0a | |
parent | 10e629d31aacb2348a1e9110c31a29e98b31ce38 (diff) | |
download | linux-514c13b1faed74e9bc19061b6d7c78d53a3402ba.tar.xz |
Input: iqs7222 - avoid sending empty SYN_REPORT events
Add a check to prevent sending undefined events, which ultimately
map to SYN_REPORT.
Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C")
Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/20220908131548.48120-7-jeff@labundy.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/misc/iqs7222.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/misc/iqs7222.c b/drivers/input/misc/iqs7222.c index 376ba3e29eb6..b8749c3f94b4 100644 --- a/drivers/input/misc/iqs7222.c +++ b/drivers/input/misc/iqs7222.c @@ -2326,6 +2326,9 @@ static int iqs7222_report(struct iqs7222_private *iqs7222) int k = 2 + j * (num_chan > 16 ? 2 : 1); u16 state = le16_to_cpu(status[k + i / 16]); + if (!iqs7222->kp_type[i][j]) + continue; + input_event(iqs7222->keypad, iqs7222->kp_type[i][j], iqs7222->kp_code[i][j], |