summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-13 20:49:34 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-13 20:49:34 +0100
commit6d90b4f99d62e6cf7643c7d8b48a9d7c005455bd (patch)
treecdf7b115c0e8bca8b89969119a48412a81a2548a /drivers/input/touchscreen
parentMerge tag 'sound-4.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/t... (diff)
parentInput: elants_i2c - avoid divide by 0 errors on bad touchscreen data (diff)
downloadlinux-6d90b4f99d62e6cf7643c7d8b48a9d7c005455bd.tar.xz
linux-6d90b4f99d62e6cf7643c7d8b48a9d7c005455bd.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: "Small driver fixups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elants_i2c - avoid divide by 0 errors on bad touchscreen data Input: adxl34x - make it enumerable in ACPI environment Input: ALPS - fix TrackStick Y axis handling for SS5 hardware Input: synaptics-rmi4 - fix F03 build error when serio is module Input: xpad - use correct product id for x360w controllers Input: synaptics_i2c - change msleep to usleep_range for small msecs Input: i8042 - add Pegatron touchpad to noloop table Input: joydev - remove unused linux/miscdevice.h include
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/elants_i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
index 02aec284deca..3e6003d32e56 100644
--- a/drivers/input/touchscreen/elants_i2c.c
+++ b/drivers/input/touchscreen/elants_i2c.c
@@ -914,9 +914,9 @@ static irqreturn_t elants_i2c_irq(int irq, void *_dev)
case QUEUE_HEADER_NORMAL:
report_count = ts->buf[FW_HDR_COUNT];
- if (report_count > 3) {
+ if (report_count == 0 || report_count > 3) {
dev_err(&client->dev,
- "too large report count: %*ph\n",
+ "bad report count: %*ph\n",
HEADER_SIZE, ts->buf);
break;
}