soc/amd/common/fsp/fsp-acpi: rework HOB pointer validity check

Checking if the return value of the fsp_find_extension_hob_by_guid call
is NULL should make the code a bit easier to read.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I6bdb07eab6da80f46c57f5d7b3c894b41ac23b8a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66699
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
This commit is contained in:
Felix Held 2022-08-10 16:34:47 +02:00
parent d1a42b6fa9
commit ebc36c1b48
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ uintptr_t add_agesa_fsp_acpi_table(guid_t guid, const char *name, acpi_rsdp_t *r
size_t hob_size; size_t hob_size;
data = fsp_find_extension_hob_by_guid(guid.b, &hob_size); data = fsp_find_extension_hob_by_guid(guid.b, &hob_size);
if (!data) { if (data == NULL) {
printk(BIOS_ERR, "AGESA %s ACPI table was not found.\n", name); printk(BIOS_ERR, "AGESA %s ACPI table was not found.\n", name);
return current; return current;
} }