u16 error;
int ret;
- /* Acknowledge the command that failed */
- ret = ucsi_acknowledge(ucsi, false);
- if (ret)
- return ret;
-
command = UCSI_GET_ERROR_STATUS | UCSI_CONNECTOR_NUMBER(connector_num);
ret = ucsi_exec_command(ucsi, command);
if (ret < 0)
}
if (cci & UCSI_CCI_ERROR) {
- if (cmd == UCSI_GET_ERROR_STATUS) {
- ret = ucsi_acknowledge(ucsi, false);
- if (ret)
- return ret;
+ /* Acknowledge the command that failed */
+ ret = ucsi_acknowledge(ucsi, false);
+ if (ret)
+ return ret;
+ if (cmd == UCSI_GET_ERROR_STATUS)
return -EIO;
- }
+
return ucsi_read_error(ucsi, connector_num);
}