Skip to content

Commit 8c4efe7

Browse files
committed
cypress5525: Correct a compiler warning
This seems to be handling an error case incorrectly. board/hx30/cypress5525.c: In function 'cyp5525_port_int': board/hx30/cypress5525.c:974:9: error: this 'if' clause does not guard... [-Werror=misleading-indentation] 974 | if (rv != EC_SUCCESS) | ^~ board/hx30/cypress5525.c:976:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' 976 | print_pd_response_code(controller, | ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Simon Glass <[email protected]>
1 parent 38c1b38 commit 8c4efe7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

board/hx30/cypress5525.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,12 +971,13 @@ void cyp5525_port_int(int controller, int port)
971971
int port_idx = (controller << 1) + port;
972972
/* enum pd_msg_type sop_type; */
973973
rv = i2c_read_offset16_block(i2c_port, addr_flags, CYP5525_PORT_PD_RESPONSE_REG(port), data2, 4);
974-
if (rv != EC_SUCCESS)
974+
if (rv != EC_SUCCESS) {
975975
CPRINTS("PORT_PD_RESPONSE_REG failed");
976976
print_pd_response_code(controller,
977977
port,
978978
data2[0],
979979
data2[1]);
980+
}
980981

981982
response_len = data2[1];
982983
switch (data2[0]) {

0 commit comments

Comments
 (0)