[PATCH v9 44/55] Input: atmel_mxt_ts: return error from mxt_process_messages_until_invalid()
From: Jiada Wang
Date: Wed Mar 25 2020 - 09:36:39 EST
From: Dean Jenkins <Dean_Jenkins@xxxxxxxxxx>
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 <Dean_Jenkins@xxxxxxxxxx>
Signed-off-by: Deepak Das <deepak_das@xxxxxxxxxx>
Signed-off-by: George G. Davis <george_davis@xxxxxxxxxx>
Signed-off-by: Jiada Wang <jiada_wang@xxxxxxxxxx>
---
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 384b53717139..bbec5a8e0bb6 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1561,6 +1561,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