From 3d722dd4509df5df6c2e27a6485a7336ba31cc7a Mon Sep 17 00:00:00 2001 From: Zheng Yongjun Date: Thu, 10 Dec 2020 22:25:52 -0800 Subject: Input: atmel_mxt_ts - simplify the return expression of mxt_send_bootloader_cmd() Simplify the return expression. Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20201210135943.1612-1-zhengyongjun3@huawei.com Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/atmel_mxt_ts.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'drivers/input') 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, -- cgit v1.2.3-70-g09d2