diff mbox series

[06/11] Input: iqs7222 - avoid sending empty SYN_REPORT events

Message ID 20220908131548.48120-7-jeff@labundy.com
State Accepted
Commit 514c13b1faed74e9bc19061b6d7c78d53a3402ba
Headers show
Series Additional fixes for Azoteq IQS7222A/B/C | expand

Commit Message

Jeff LaBundy Sept. 8, 2022, 1:15 p.m. UTC
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>
---
 drivers/input/misc/iqs7222.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Dmitry Torokhov Sept. 14, 2022, 10:10 a.m. UTC | #1
On Thu, Sep 08, 2022 at 08:15:43AM -0500, Jeff LaBundy wrote:
> 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>

Applied, thank you.
diff mbox series

Patch

diff --git a/drivers/input/misc/iqs7222.c b/drivers/input/misc/iqs7222.c
index 365e59f78f1a..00c73a920ab2 100644
--- a/drivers/input/misc/iqs7222.c
+++ b/drivers/input/misc/iqs7222.c
@@ -2427,6 +2427,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],