aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Krogerus <[email protected]>2024-08-16 16:58:59 +0300
committerGreg Kroah-Hartman <[email protected]>2024-08-23 18:47:39 +0800
commitfb9804096bb3508e33ade5a72f2332080cf1324b (patch)
treef8bf61738c23f29d2a9da6231b2f6c0a12ded479
parent4f322657ade1b784bb2b1ba8761469ae87520681 (diff)
usb: typec: ucsi: Remove useless error check from ucsi_read_error()
If the GET_ERROR_STATUS command fails, ucsi_read_error() can not reach the condition where the CCI error bit is checked, because ucsi_run_command() has already checked that bit and returned an error. Signed-off-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/usb/typec/ucsi/ucsi.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index 8be10a207121..f0b5867048e2 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -148,9 +148,6 @@ static int ucsi_read_error(struct ucsi *ucsi, u8 connector_num)
if (ret < 0)
return ret;
- if (cci & UCSI_CCI_ERROR)
- return -EIO;
-
switch (error) {
case UCSI_ERROR_INCOMPATIBLE_PARTNER:
return -EOPNOTSUPP;