summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2020-12-10 22:25:52 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-12-10 23:39:18 -0800
commit3d722dd4509df5df6c2e27a6485a7336ba31cc7a (patch)
treeeacc8eb5ffe449267f92525a6cd220c39953cf5f /drivers
parentc8834032ffe249a2a1b9702359ff29a28b8fcf1e (diff)
downloadlinux-stable-3d722dd4509df5df6c2e27a6485a7336ba31cc7a.tar.gz
linux-stable-3d722dd4509df5df6c2e27a6485a7336ba31cc7a.tar.bz2
linux-stable-3d722dd4509df5df6c2e27a6485a7336ba31cc7a.zip
Input: atmel_mxt_ts - simplify the return expression of mxt_send_bootloader_cmd()
Simplify the return expression. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Link: https://lore.kernel.org/r/20201210135943.1612-1-zhengyongjun3@huawei.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/touchscreen/atmel_mxt_ts.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index dde364dfb79d..f5a86aa9690e 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -608,7 +608,6 @@ recheck:
static int mxt_send_bootloader_cmd(struct mxt_data *data, bool unlock)
{
- int ret;
u8 buf[2];
if (unlock) {
@@ -619,11 +618,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, sizeof(buf));
}
static int __mxt_read_reg(struct i2c_client *client,