From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiada Wang Subject: [PATCH v1 44/63] Input: atmel_mxt_ts: return error from mxt_process_messages_until_invalid() Date: Fri, 16 Aug 2019 17:35:39 +0900 Message-ID: <20190816083558.19189-5-jiada_wang@mentor.com> References: <20190816083558.19189-1-jiada_wang@mentor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Return-path: In-Reply-To: <20190816083558.19189-1-jiada_wang@mentor.com> Sender: linux-kernel-owner@vger.kernel.org To: nick@shmanahar.org, dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, jiada_wang@mentor.com, george_davis@mentor.com List-Id: linux-input@vger.kernel.org From: Dean Jenkins 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 Signed-off-by: Deepak Das Signed-off-by: George G. Davis Signed-off-by: Jiada Wang --- 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 b3d40390abb6..ed5b98c067e8 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -1551,6 +1551,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.19.2