Commit 3d722dd4 authored by Zheng Yongjun's avatar Zheng Yongjun Committed by Dmitry Torokhov

Input: atmel_mxt_ts - simplify the return expression of mxt_send_bootloader_cmd()

Simplify the return expression.
Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Link: https://lore.kernel.org/r/20201210135943.1612-1-zhengyongjun3@huawei.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent c8834032
......@@ -608,7 +608,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) {
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment