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 <arthur@aheymans.xyz>
Change-Id: Ifdf7acec38a7c958aac2cf1f3bbf16c27fa90b8c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75903
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Arthur Heymans 2023-06-17 14:13:54 +02:00 committed by Lean Sheng Tan
parent 7ebebf72f8
commit 0600aa64c3
1 changed files with 2 additions and 2 deletions

View File

@ -1931,7 +1931,7 @@ unsigned long write_acpi_tables(const unsigned long start)
dsdt_file = cbfs_map(CONFIG_CBFS_PREFIX "/dsdt.aml", &dsdt_size); dsdt_file = cbfs_map(CONFIG_CBFS_PREFIX "/dsdt.aml", &dsdt_size);
if (!dsdt_file) { if (!dsdt_file) {
printk(BIOS_ERR, "No DSDT file, skipping ACPI tables\n"); printk(BIOS_ERR, "No DSDT file, skipping ACPI tables\n");
return current; return start;
} }
if (dsdt_file->length > dsdt_size 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) { || memcmp(dsdt_file->signature, "DSDT", 4) != 0) {
printk(BIOS_ERR, "Invalid DSDT file, skipping ACPI tables\n"); printk(BIOS_ERR, "Invalid DSDT file, skipping ACPI tables\n");
cbfs_unmap(dsdt_file); cbfs_unmap(dsdt_file);
return current; return start;
} }
slic_file = cbfs_map(CONFIG_CBFS_PREFIX "/slic", &slic_size); slic_file = cbfs_map(CONFIG_CBFS_PREFIX "/slic", &slic_size);