John Zhao has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33150
Change subject: src/drivers/intel: Fix Coverity scan report ......................................................................
src/drivers/intel: Fix Coverity scan report
Coverity detects pointer fih as FORWARD_NULL. Add sanity check for fih to prevent null pointer dereference.
BUG=CID 1401717 TEST=Built and boot up to kernel.
Change-Id: Ia6853e5302c87d9ffe52b942f067be56f6e77406 Signed-off-by: John Zhao john.zhao@intel.com --- M src/drivers/intel/fsp1_1/car.c 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/50/33150/1
diff --git a/src/drivers/intel/fsp1_1/car.c b/src/drivers/intel/fsp1_1/car.c index 3a41e40..17e6328 100644 --- a/src/drivers/intel/fsp1_1/car.c +++ b/src/drivers/intel/fsp1_1/car.c @@ -112,6 +112,9 @@ * the flash is memory mapped CPU's address space. */ fih = find_fsp((uintptr_t)rdev_mmap_full(prog_rdev(&fsp)));
+ if (!fih) + return; + set_fih_car(fih);
/* Return new stack value in RAM back to assembly stub. */