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>
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user