* [PATCH -next] input/touchscreen: simplify the return expression of mxt_send_bootloader_cmd()
@ 2020-12-10 13:59 Zheng Yongjun
2020-12-11 6:28 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-10 13:59 UTC (permalink / raw)
To: nick, dmitry.torokhov, linux-input, linux-kernel; +Cc: Zheng Yongjun
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] input/touchscreen: simplify the return expression of mxt_send_bootloader_cmd()
2020-12-10 13:59 [PATCH -next] input/touchscreen: simplify the return expression of mxt_send_bootloader_cmd() Zheng Yongjun
@ 2020-12-11 6:28 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2020-12-11 6:28 UTC (permalink / raw)
To: Zheng Yongjun; +Cc: nick, linux-input, linux-kernel
On Thu, Dec 10, 2020 at 09:59:43PM +0800, Zheng Yongjun wrote:
> Simplify the return expression.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-11 6:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 13:59 [PATCH -next] input/touchscreen: simplify the return expression of mxt_send_bootloader_cmd() Zheng Yongjun
2020-12-11 6:28 ` Dmitry Torokhov
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).