Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/55541 )
Change subject: soc/amd/common/block/acpi/bert: fix NULL check ......................................................................
soc/amd/common/block/acpi/bert: fix NULL check
In acpi_soc_get_bert_region after the bert_errors_region call is was checked if the region parameter is NULL after the call; since region is a parameter of acpi_soc_get_bert_region, it's non-NULL. What we should be checking here is if region points to a non-NULL pointer.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Reported-by: Coverity (CID:1457506) Change-Id: I0523504d65725ab2d2df4db28a5dedd90697b917 --- M src/soc/amd/common/block/acpi/bert.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/55541/1
diff --git a/src/soc/amd/common/block/acpi/bert.c b/src/soc/amd/common/block/acpi/bert.c index 207ee09..968c9a6 100644 --- a/src/soc/amd/common/block/acpi/bert.c +++ b/src/soc/amd/common/block/acpi/bert.c @@ -16,7 +16,7 @@ return CB_ERR;
bert_errors_region(region, length); - if (!region) { + if (!*region) { printk(BIOS_ERR, "Error: Can't find BERT storage area\n"); return CB_ERR; }