From patchwork Thu Mar 19 15:00:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Jiada" X-Patchwork-Id: 11447371 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B054913 for ; Thu, 19 Mar 2020 15:03:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2480820B1F for ; Thu, 19 Mar 2020 15:03:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728372AbgCSPDD (ORCPT ); Thu, 19 Mar 2020 11:03:03 -0400 Received: from esa3.mentor.iphmx.com ([68.232.137.180]:32379 "EHLO esa3.mentor.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728370AbgCSPDD (ORCPT ); Thu, 19 Mar 2020 11:03:03 -0400 IronPort-SDR: 22/m8Pr2ZEdlhlF9WqeDi6uOdg54KgQeINoEaIKmFnoyD/cBD6XTC/XSw3E/bfEMR6Di0Fvaop nrlLzOtZFBSjnSv8BOG/oWwh8JZjCT+DVrd5DdhvrS0YkrBqEkzdJtFH+OzQF2hGTDwz+j2r6p DPt9WuGviVc71dt2uNYWj/Lpkn4lMOHgApSMJbtdxlgEG9AB0BwH0Q7bTtsu2N5ocfyrx2aSWp G5qyYec3g6l6XdDGiDOV00z6ypNLkHWwU02U7pw9ovwSXLl7k6RmNONa5/uBYHVtDJouW5XBUT Ehg= X-IronPort-AV: E=Sophos;i="5.70,572,1574150400"; d="scan'208";a="46891033" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 19 Mar 2020 07:03:02 -0800 IronPort-SDR: K5vGjlBOXhGv6FN/B2bu7F7wIS2bhhecQzdeSdKfmnpAUuNBY8827cL3CuxQAyyHoNOwYQOXt0 B3LubGo0uIxSK0rGtNoVbMgFHu36kL3nu+JBgAM/fEMQdILmkzPBQ+GLUpq32pBUbn9PI0pFY6 5BOn/bs1Pp7rF95QmDK0Z2b9RlcChzEzrFxOmky64KHfFILBiFC5papkcEwRhskpSg9JeNjHnr /sPjs5huNUK+mRXGBd//Zg2eMxzZJL1KGyLIDyobmKhMixKQyXoDs2fwM4GmZwB/qtJaMRm+9b 1F0= From: Jiada Wang To: , , , , , CC: , , , , Subject: [PATCH v8 41/52] Input: atmel_mxt_ts: return error from mxt_process_messages_until_invalid() Date: Thu, 19 Mar 2020 08:00:05 -0700 Message-ID: <20200319150016.61398-42-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200319150016.61398-1-jiada_wang@mentor.com> References: <20200319150016.61398-1-jiada_wang@mentor.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: 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 13258da70305..6ee83eda7170 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);