From 94e4961a0122df88d51f000dc148d9bd7d05409b Mon Sep 17 00:00:00 2001 From: Lijian Zhao Date: Sat, 6 Feb 2021 12:18:12 +0800 Subject: acpi: Fix Coverity Scan report Fix the issue that return value "r" in line 534 will get overwritten problem. BUG=CID 1445995 TEST=Build sucessful and boot up in QEMU Signed-off-by: Lijian Zhao Change-Id: Icf760b142cfecfed7c929c15ad190ac74df027b1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/50352 Tested-by: build bot (Jenkins) Reviewed-by: Francois Toguo Fotso Reviewed-by: Angel Pons Reviewed-by: Tim Wawrzynczak --- src/arch/x86/acpi_bert_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/arch/x86/acpi_bert_storage.c b/src/arch/x86/acpi_bert_storage.c index f1dcf47c23..b07b67ee8a 100644 --- a/src/arch/x86/acpi_bert_storage.c +++ b/src/arch/x86/acpi_bert_storage.c @@ -534,7 +534,7 @@ acpi_generic_error_status_t *bert_new_event(guid_t *guid) r = bert_append_genproc(status); else if (!guidcmp(guid, &CPER_SEC_PROC_GENERIC_GUID)) r = bert_append_ia32x64(status); - if (!guidcmp(guid, &CPER_SEC_FW_ERR_REC_REF_GUID)) + else if (!guidcmp(guid, &CPER_SEC_FW_ERR_REC_REF_GUID)) r = bert_append_fw_err(status); /* else if other types not implemented */ else -- cgit v1.2.3