* [PATCH -next] Input: atmel_mxt_ts - simplify the return expression of mxt_send_bootloader_cmd
@ 2020-09-21 13:10 Qinglang Miao
0 siblings, 0 replies; only message in thread
From: Qinglang Miao @ 2020-09-21 13:10 UTC (permalink / raw)
To: Nick Dyer, Dmitry Torokhov; +Cc: linux-input, linux-kernel, Qinglang Miao
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@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 98f17fa3a..b9aa2c912 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.23.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-21 13:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 13:10 [PATCH -next] Input: atmel_mxt_ts - simplify the return expression of mxt_send_bootloader_cmd Qinglang Miao
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).