From: Dean Jenkins <[email protected]>
mxt_process_messages_until_invalid() failed to propagate the error
code from mxt_read_and_process_messages() so return the error code.
Signed-off-by: Dean Jenkins <[email protected]>
Signed-off-by: Deepak Das <[email protected]>
Signed-off-by: George G. Davis <[email protected]>
Signed-off-by: Jiada Wang <[email protected]>
---
drivers/input/touchscreen/atmel_mxt_ts.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index ed850a0bae69..7c530ffac1ba 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1563,6 +1563,8 @@ static int mxt_process_messages_until_invalid(struct mxt_data *data)
/* Read messages until we force an invalid */
do {
read = mxt_read_and_process_messages(data, count);
+ if (read < 0)
+ return read;
if (read < count)
return 0;
} while (--tries);
--
2.17.1