Skip to content

Commit 32cf3a6

Browse files
Dan Carpenterdtor
authored andcommitted
Input: raydium_i2c_ts - fix error codes in raydium_i2c_boot_trigger()
These functions are supposed to return negative error codes but instead it returns true on failure and false on success. The error codes are eventually propagated back to user space. Fixes: 48a2b78 ("Input: add Raydium I2C touchscreen driver") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 3dbae15 commit 32cf3a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/input/touchscreen/raydium_i2c_ts.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ static int raydium_i2c_write_object(struct i2c_client *client,
432432
return 0;
433433
}
434434

435-
static bool raydium_i2c_boot_trigger(struct i2c_client *client)
435+
static int raydium_i2c_boot_trigger(struct i2c_client *client)
436436
{
437437
static const u8 cmd[7][6] = {
438438
{ 0x08, 0x0C, 0x09, 0x00, 0x50, 0xD7 },
@@ -457,10 +457,10 @@ static bool raydium_i2c_boot_trigger(struct i2c_client *client)
457457
}
458458
}
459459

460-
return false;
460+
return 0;
461461
}
462462

463-
static bool raydium_i2c_fw_trigger(struct i2c_client *client)
463+
static int raydium_i2c_fw_trigger(struct i2c_client *client)
464464
{
465465
static const u8 cmd[5][11] = {
466466
{ 0, 0x09, 0x71, 0x0C, 0x09, 0x00, 0x50, 0xD7, 0, 0, 0 },
@@ -483,7 +483,7 @@ static bool raydium_i2c_fw_trigger(struct i2c_client *client)
483483
}
484484
}
485485

486-
return false;
486+
return 0;
487487
}
488488

489489
static int raydium_i2c_check_path(struct i2c_client *client)

0 commit comments

Comments
 (0)