summaryrefslogtreecommitdiff
path: root/util/comm-lpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/comm-lpc.c')
-rw-r--r--util/comm-lpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/comm-lpc.c b/util/comm-lpc.c
index 06912af1f2..e7c5a25b55 100644
--- a/util/comm-lpc.c
+++ b/util/comm-lpc.c
@@ -83,7 +83,7 @@ static int ec_command_lpc(int command, int version,
i = inb(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 */
@@ -178,7 +178,7 @@ static int ec_command_lpc_3(int command, int version,
i = inb(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 */