diff options
Diffstat (limited to 'drivers/input/touchscreen/atmel_mxt_ts.c')
-rw-r--r-- | drivers/input/touchscreen/atmel_mxt_ts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 15ae6fd575b2..8f0dc7776e7d 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c | |||
@@ -506,7 +506,7 @@ static int mxt_write_object(struct mxt_data *data, | |||
506 | u16 reg; | 506 | u16 reg; |
507 | 507 | ||
508 | object = mxt_get_object(data, type); | 508 | object = mxt_get_object(data, type); |
509 | if (!object) | 509 | if (!object || offset >= object->size + 1) |
510 | return -EINVAL; | 510 | return -EINVAL; |
511 | 511 | ||
512 | reg = object->start_address; | 512 | reg = object->start_address; |