summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/elants_i2c.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2017-01-24 12:37:43 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-01-24 12:37:43 -0800
commit0cce284537fb42d9c28b9b31038ffc9b464555f5 (patch)
treee7af3b5fe2d04ef6527b5da50851d498ee13184e /drivers/input/touchscreen/elants_i2c.c
parentcefb26d4b37c329f624eb235a1bdc7b6b8dd9430 (diff)
parent7a308bb3016f57e5be11a677d15b821536419d36 (diff)
Merge tag 'v4.10-rc5' into next
Sync up with mainline to bring up improvements in various subsystems.
Diffstat (limited to 'drivers/input/touchscreen/elants_i2c.c')
-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 740e4483f4fd..872750eeca93 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;
}