summaryrefslogtreecommitdiff
path: root/src/ec
diff options
context:
space:
mode:
authorRob Barnes <robbarnes@google.com>2021-06-11 16:06:09 -0600
committerFelix Held <felix-coreboot@felixheld.de>2021-06-17 17:04:56 +0000
commit5fd0341fccb66099cc2b7ca7f7c44e4136e9bf28 (patch)
tree2a0b1ecf5684d58e51a74fd5139a41add859e44d /src/ec
parentbcf42fb7b1dcef7c616d3598fd947384dc78b916 (diff)
ec/google: Fix bad return value
google_chromeec_get_event returns an event number and 0 when there's no event. This function is usually called in a loop until there are no more events, so it makes sense to return 0 (i.e. no event) when there's an error. BUG=b:184074997 TEST=Boot guybrush, no ec errors Change-Id: I6c0186e4637af9ae24f45cce3638f0913227d6a7 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55437 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/ec')
-rw-r--r--src/ec/google/chromeec/ec_lpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ec/google/chromeec/ec_lpc.c b/src/ec/google/chromeec/ec_lpc.c
index 3b2a7465a3..623aed50ff 100644
--- a/src/ec/google/chromeec/ec_lpc.c
+++ b/src/ec/google/chromeec/ec_lpc.c
@@ -465,7 +465,7 @@ u8 google_chromeec_get_event(void)
{
if (google_chromeec_wait_ready(EC_LPC_ADDR_ACPI_CMD)) {
printk(BIOS_ERR, "Timeout waiting for EC ready!\n");
- return 1;
+ return 0;
}
/* Issue the ACPI query-event command */