Commit 514c13b1 authored by Jeff LaBundy's avatar Jeff LaBundy Committed by Dmitry Torokhov

Input: iqs7222 - avoid sending empty SYN_REPORT events

Add a check to prevent sending undefined events, which ultimately
map to SYN_REPORT.

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/20220908131548.48120-7-jeff@labundy.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 10e629d3
...@@ -2326,6 +2326,9 @@ static int iqs7222_report(struct iqs7222_private *iqs7222) ...@@ -2326,6 +2326,9 @@ static int iqs7222_report(struct iqs7222_private *iqs7222)
int k = 2 + j * (num_chan > 16 ? 2 : 1); int k = 2 + j * (num_chan > 16 ? 2 : 1);
u16 state = le16_to_cpu(status[k + i / 16]); u16 state = le16_to_cpu(status[k + i / 16]);
if (!iqs7222->kp_type[i][j])
continue;
input_event(iqs7222->keypad, input_event(iqs7222->keypad,
iqs7222->kp_type[i][j], iqs7222->kp_type[i][j],
iqs7222->kp_code[i][j], iqs7222->kp_code[i][j],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment