Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/42846 )
Change subject: soc/amd/picasso: add NULL-pointer check to root_complex_fill_ssdt ......................................................................
soc/amd/picasso: add NULL-pointer check to root_complex_fill_ssdt
Found-by: Coverity CID 1429980
Change-Id: Ia72b9dbe029a5da98e408a9cf16fa4a93b10917a Signed-off-by: Felix Held felix-coreboot@felixheld.de --- M src/soc/amd/picasso/root_complex.c 1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/42846/1
diff --git a/src/soc/amd/picasso/root_complex.c b/src/soc/amd/picasso/root_complex.c index 4930a0e..af347e7 100644 --- a/src/soc/amd/picasso/root_complex.c +++ b/src/soc/amd/picasso/root_complex.c @@ -135,6 +135,11 @@ { msr_t msr;
+ if (!device) { + printk(BIOS_ERR, "Error: %s device is NULL.\n", __func__); + return; + } + acpigen_write_scope(acpi_device_scope(device));
msr = rdmsr(TOP_MEM);