Skip to content

Commit 3d722dd

Browse files
Zheng Yongjundtor
authored andcommitted
Input: atmel_mxt_ts - simplify the return expression of mxt_send_bootloader_cmd()
Simplify the return expression. Signed-off-by: Zheng Yongjun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent c883403 commit 3d722dd

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/input/touchscreen/atmel_mxt_ts.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,6 @@ static int mxt_check_bootloader(struct mxt_data *data, unsigned int state,
608608

609609
static int mxt_send_bootloader_cmd(struct mxt_data *data, bool unlock)
610610
{
611-
int ret;
612611
u8 buf[2];
613612

614613
if (unlock) {
@@ -619,11 +618,7 @@ static int mxt_send_bootloader_cmd(struct mxt_data *data, bool unlock)
619618
buf[1] = 0x01;
620619
}
621620

622-
ret = mxt_bootloader_write(data, buf, 2);
623-
if (ret)
624-
return ret;
625-
626-
return 0;
621+
return mxt_bootloader_write(data, buf, sizeof(buf));
627622
}
628623

629624
static int __mxt_read_reg(struct i2c_client *client,

0 commit comments

Comments
 (0)