summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Mastykin <dmastykin@astralinux.ru>2020-03-24 11:38:28 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-06 08:33:48 +0200
commit9ce35dad5a1ac262559c0d296de049dcb5b05799 (patch)
treec9b0d3362bdea09be2643fdd4e28b1b50050b323
parentbdbc7ef3eb2c0052c59500fa3f9d9386091206f1 (diff)
downloadlinux-9ce35dad5a1ac262559c0d296de049dcb5b05799.tar.gz
linux-9ce35dad5a1ac262559c0d296de049dcb5b05799.tar.bz2
linux-9ce35dad5a1ac262559c0d296de049dcb5b05799.zip
Input: goodix - fix spurious key release events
commit 24ef83f6e31d20fc121a7cd732b04b498475fca3 upstream. The goodix panel sends spurious interrupts after a 'finger up' event, which always cause a timeout. We were exiting the interrupt handler by reporting touch_num == 0, but this was still processed as valid and caused the code to use the uninitialised point_data, creating spurious key release events. Report an error from the interrupt handler so as to avoid processing invalid point_data further. Signed-off-by: Dmitry Mastykin <dmastykin@astralinux.ru> Reviewed-by: Bastien Nocera <hadess@hadess.net> Link: https://lore.kernel.org/r/20200316075302.3759-2-dmastykin@astralinux.ru Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Fabio Estevam <festevam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/input/touchscreen/goodix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
index bfb945fc33a1..3c9cdb87770f 100644
--- a/drivers/input/touchscreen/goodix.c
+++ b/drivers/input/touchscreen/goodix.c
@@ -335,7 +335,7 @@ static int goodix_ts_read_input_report(struct goodix_ts_data *ts, u8 *data)
* The Goodix panel will send spurious interrupts after a
* 'finger up' event, which will always cause a timeout.
*/
- return 0;
+ return -ENOMSG;
}
static void goodix_ts_report_touch_8b(struct goodix_ts_data *ts, u8 *coor_data)