diff options
author | Dan Carpenter <[email protected]> | 2024-07-12 09:05:50 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2024-07-31 10:39:47 +0200 |
commit | 3c526089a663e25ac78b6a61d84a52a83680d0c3 (patch) | |
tree | 4194dcb32a3bd1e767e246425372f9d00c68d262 | |
parent | e885f5f1f2b43575aa8e4e31404132d77d6663d1 (diff) |
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: 62ce9ef14797 ("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]>
-rw-r--r-- | drivers/usb/typec/tcpm/tcpci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c index b862fdf3fe1d..3e3dcb983dde 100644 --- a/drivers/usb/typec/tcpm/tcpci.c +++ b/drivers/usb/typec/tcpm/tcpci.c @@ -67,7 +67,7 @@ static int tcpci_write16(struct tcpci *tcpci, unsigned int reg, u16 val) return regmap_raw_write(tcpci->regmap, reg, &val, sizeof(u16)); } -static bool tcpci_check_std_output_cap(struct regmap *regmap, u8 mask) +static int tcpci_check_std_output_cap(struct regmap *regmap, u8 mask) { unsigned int reg; int ret; |