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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55541 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
ec225f01b1
commit
5d084ddb87
|
@ -16,7 +16,7 @@ enum cb_err acpi_soc_get_bert_region(void **region, size_t *length)
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue