From 0600aa64c3d140b3e561c508d73b50afabe7e990 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Sat, 17 Jun 2023 14:13:54 +0200 Subject: [PATCH] acpi/acpi.c: Return function argument when bailing out Returning a constant value makes the function easier to read and think about. Signed-off-by: Arthur Heymans Change-Id: Ifdf7acec38a7c958aac2cf1f3bbf16c27fa90b8c Reviewed-on: https://review.coreboot.org/c/coreboot/+/75903 Reviewed-by: Lean Sheng Tan Tested-by: build bot (Jenkins) --- src/acpi/acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/acpi/acpi.c b/src/acpi/acpi.c index ce1453825f..cfc388bb10 100644 --- a/src/acpi/acpi.c +++ b/src/acpi/acpi.c @@ -1931,7 +1931,7 @@ unsigned long write_acpi_tables(const unsigned long start) dsdt_file = cbfs_map(CONFIG_CBFS_PREFIX "/dsdt.aml", &dsdt_size); if (!dsdt_file) { printk(BIOS_ERR, "No DSDT file, skipping ACPI tables\n"); - return current; + return start; } if (dsdt_file->length > dsdt_size @@ -1939,7 +1939,7 @@ unsigned long write_acpi_tables(const unsigned long start) || memcmp(dsdt_file->signature, "DSDT", 4) != 0) { printk(BIOS_ERR, "Invalid DSDT file, skipping ACPI tables\n"); cbfs_unmap(dsdt_file); - return current; + return start; } slic_file = cbfs_map(CONFIG_CBFS_PREFIX "/slic", &slic_size);