aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/elants_i2c.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-16 17:01:44 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-16 17:01:44 +0100
commit39461ffdfc974147ad0f3cc0da397a999adc25b1 (patch)
tree7358951dcc952436cfa09072f376637c6f807984 /drivers/input/touchscreen/elants_i2c.c
parentb0f2d7d546d37697d3f50753904f6f0c549b62bc (diff)
parent49def1853334396f948dcb4cedb9347abb318df5 (diff)
Merge 4.10-rc4 into char-misc-next
We want the char/misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 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;
}