diff mbox series

[-next] input/touchscreen: simplify the return expression of mxt_send_bootloader_cmd()

Message ID 20201210135943.1612-1-zhengyongjun3@huawei.com (mailing list archive)
State Accepted
Headers show
Series [-next] input/touchscreen: simplify the return expression of mxt_send_bootloader_cmd() | expand

Commit Message

Zheng Yongjun Dec. 10, 2020, 1:59 p.m. UTC
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(-)

Comments

Dmitry Torokhov Dec. 11, 2020, 6:28 a.m. UTC | #1
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.
diff mbox series

Patch

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,