summaryrefslogtreecommitdiff
path: root/util/comm-mec1322.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/comm-mec1322.c')
-rw-r--r--util/comm-mec1322.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/comm-mec1322.c b/util/comm-mec1322.c
index 70e4f3ff89..61c93e184b 100644
--- a/util/comm-mec1322.c
+++ b/util/comm-mec1322.c
@@ -148,7 +148,7 @@ static int ec_command_lpc(int command, int version,
i = read_byte(EC_LPC_ADDR_HOST_DATA);
if (i) {
fprintf(stderr, "EC returned error result code %d\n", i);
- return -i;
+ return -EECRESULT - i;
}
/* Read back args */
@@ -236,7 +236,7 @@ static int ec_command_lpc_3(int command, int version,
i = read_byte(EC_LPC_ADDR_HOST_DATA);
if (i) {
fprintf(stderr, "EC returned error result code %d\n", i);
- return -i;
+ return -EECRESULT - i;
}
/* Read back response header and start checksum */