Skip to content

Commit d209d16

Browse files
Heikki Krogerusgregkh
authored andcommitted
usb: typec: ucsi: Fix the return value of ucsi_run_command()
The command execution routines need to return the amount of data that was transferred when succesful. This fixes an issue where the alternate modes and the power delivery capabilities are not getting registered. Fixes: 5e9c166 ("usb: typec: ucsi: rework command execution functions") Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20240809150343.286942-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 741b41b commit d209d16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/typec/ucsi/ucsi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static int ucsi_run_command(struct ucsi *ucsi, u64 command, u32 *cci,
137137
if (ret)
138138
return ret;
139139

140-
return err;
140+
return err ?: UCSI_CCI_LENGTH(*cci);
141141
}
142142

143143
static int ucsi_read_error(struct ucsi *ucsi, u8 connector_num)

0 commit comments

Comments
 (0)