diff options
Diffstat (limited to 'drivers/input/touchscreen/elants_i2c.c')
| -rw-r--r-- | drivers/input/touchscreen/elants_i2c.c | 4 |
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) | |||
| 914 | 914 | ||
| 915 | case QUEUE_HEADER_NORMAL: | 915 | case QUEUE_HEADER_NORMAL: |
| 916 | report_count = ts->buf[FW_HDR_COUNT]; | 916 | report_count = ts->buf[FW_HDR_COUNT]; |
| 917 | if (report_count > 3) { | 917 | if (report_count == 0 || report_count > 3) { |
| 918 | dev_err(&client->dev, | 918 | dev_err(&client->dev, |
| 919 | "too large report count: %*ph\n", | 919 | "bad report count: %*ph\n", |
| 920 | HEADER_SIZE, ts->buf); | 920 | HEADER_SIZE, ts->buf); |
| 921 | break; | 921 | break; |
| 922 | } | 922 | } |
