linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zheng Yongjun <zhengyongjun3@huawei.com>
To: <nick@shmanahar.org>, <dmitry.torokhov@gmail.com>,
	<linux-input@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: Zheng Yongjun <zhengyongjun3@huawei.com>
Subject: [PATCH -next] input/touchscreen: simplify the return expression of mxt_send_bootloader_cmd()
Date: Thu, 10 Dec 2020 21:59:43 +0800	[thread overview]
Message-ID: <20201210135943.1612-1-zhengyongjun3@huawei.com> (raw)

Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/input/touchscreen/atmel_mxt_ts.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index b6f75367a284..664fd940c06e 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -606,7 +606,6 @@ static int mxt_check_bootloader(struct mxt_data *data, unsigned int state,
 
 static int mxt_send_bootloader_cmd(struct mxt_data *data, bool unlock)
 {
-	int ret;
 	u8 buf[2];
 
 	if (unlock) {
@@ -617,11 +616,7 @@ static int mxt_send_bootloader_cmd(struct mxt_data *data, bool unlock)
 		buf[1] = 0x01;
 	}
 
-	ret = mxt_bootloader_write(data, buf, 2);
-	if (ret)
-		return ret;
-
-	return 0;
+	return mxt_bootloader_write(data, buf, 2);
 }
 
 static int __mxt_read_reg(struct i2c_client *client,
-- 
2.22.0


             reply	other threads:[~2020-12-10 14:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10 13:59 Zheng Yongjun [this message]
2020-12-11  6:28 ` [PATCH -next] input/touchscreen: simplify the return expression of mxt_send_bootloader_cmd() Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201210135943.1612-1-zhengyongjun3@huawei.com \
    --to=zhengyongjun3@huawei.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nick@shmanahar.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).