File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,6 @@ static int ucsi_read_error(struct ucsi *ucsi, u8 connector_num)
71
71
u16 error ;
72
72
int ret ;
73
73
74
- /* Acknowledge the command that failed */
75
- ret = ucsi_acknowledge (ucsi , false);
76
- if (ret )
77
- return ret ;
78
-
79
74
command = UCSI_GET_ERROR_STATUS | UCSI_CONNECTOR_NUMBER (connector_num );
80
75
ret = ucsi_exec_command (ucsi , command );
81
76
if (ret < 0 )
@@ -182,13 +177,14 @@ static int ucsi_exec_command(struct ucsi *ucsi, u64 cmd)
182
177
}
183
178
184
179
if (cci & UCSI_CCI_ERROR ) {
185
- if ( cmd == UCSI_GET_ERROR_STATUS ) {
186
- ret = ucsi_acknowledge (ucsi , false);
187
- if (ret )
188
- return ret ;
180
+ /* Acknowledge the command that failed */
181
+ ret = ucsi_acknowledge (ucsi , false);
182
+ if (ret )
183
+ return ret ;
189
184
185
+ if (cmd == UCSI_GET_ERROR_STATUS )
190
186
return - EIO ;
191
- }
187
+
192
188
return ucsi_read_error (ucsi , connector_num );
193
189
}
194
190
You can’t perform that action at this time.
0 commit comments