Skip to content

Commit 3c52608

Browse files
Dan Carpentergregkh
authored andcommitted
usb: typec: tcpci: Fix error code in tcpci_check_std_output_cap()
The tcpci_check_std_output_cap() function is supposed to return negative error codes but it's declared as type bool so the error handling doesn't work. Declare it as an int instead. Fixes: 62ce9ef ("usb: typec: tcpci: add support to set connector orientation") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Heikki Krogerus <[email protected]> Reviewed-by: Marco Felsch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e885f5f commit 3c52608

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/typec/tcpm/tcpci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static int tcpci_write16(struct tcpci *tcpci, unsigned int reg, u16 val)
6767
return regmap_raw_write(tcpci->regmap, reg, &val, sizeof(u16));
6868
}
6969

70-
static bool tcpci_check_std_output_cap(struct regmap *regmap, u8 mask)
70+
static int tcpci_check_std_output_cap(struct regmap *regmap, u8 mask)
7171
{
7272
unsigned int reg;
7373
int ret;

0 commit comments

Comments
 (0)