From ebc36c1b48cc91cb96b6435cc768a6a5e7043c90 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 10 Aug 2022 16:34:47 +0200 Subject: [PATCH] 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 Change-Id: I6bdb07eab6da80f46c57f5d7b3c894b41ac23b8a Reviewed-on: https://review.coreboot.org/c/coreboot/+/66699 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel --- src/soc/amd/common/fsp/fsp-acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/soc/amd/common/fsp/fsp-acpi.c b/src/soc/amd/common/fsp/fsp-acpi.c index f92d571066..8ddf7d4295 100644 --- a/src/soc/amd/common/fsp/fsp-acpi.c +++ b/src/soc/amd/common/fsp/fsp-acpi.c @@ -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; 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); return current; }