Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33154
Change subject: mb/google/link: Prevent null pointer dereference ......................................................................
mb/google/link: Prevent null pointer dereference
Only check the lastidread if there is one.
Change-Id: I81248192fe52b2d536976385715bc54aa73d450c Signed-off-by: Jacob Garber jgarber1@ualberta.ca Found-by: Coverity CID 1375985 --- M src/mainboard/google/link/i915.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/54/33154/1
diff --git a/src/mainboard/google/link/i915.c b/src/mainboard/google/link/i915.c index 12d424c..35a30c9 100644 --- a/src/mainboard/google/link/i915.c +++ b/src/mainboard/google/link/i915.c @@ -173,7 +173,7 @@ if (verbose & vio) printk(BIOS_SPEW, "\texpect %08lx\n", id->data); /* we're looking for something. */ - if (lastidread->addr == id->addr){ + if ((lastidread != NULL) && (lastidread->addr == id->addr)) { /* they're going to be polling. * just do it 1000 times */