From 5fd0341fccb66099cc2b7ca7f7c44e4136e9bf28 Mon Sep 17 00:00:00 2001 From: Rob Barnes Date: Fri, 11 Jun 2021 16:06:09 -0600 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55437 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel Reviewed-by: Angel Pons --- src/ec/google/chromeec/ec_lpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */