aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/cpu/mp_init.c
diff options
context:
space:
mode:
authorJohn Zhao <john.zhao@intel.com>2018-08-13 09:45:37 -0700
committerFelix Held <felix-coreboot@felixheld.de>2018-08-20 07:04:12 +0000
commiteac84ca35c9b8052d198a7ab3593ae8f5bbb1aa8 (patch)
treed8569e40e4ffc62fcbb7e4919d9029b9f29c2a9d /src/soc/intel/common/block/cpu/mp_init.c
parentddcf5a05e3168fbb4565a2a52c14c246822454b2 (diff)
intel/common/block: Fix issues found by klockwork
src/soc/intel/common/block/cpu/mp_init.c Function init_cpus: Pointer dev checked for NULL may be dereferenced. src/soc/intel/common/block/graphics/graphics.c Function graphics_get_bar: Pointer dev returned from call may be NULL and will be dereferenced. BRANCH=None TEST=Built & booted Yorp board. Change-Id: I5e7caa15a3911e05ff346d338493673af5318a51 Signed-off-by: John Zhao <john.zhao@intel.com> Reviewed-on: https://review.coreboot.org/28060 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/soc/intel/common/block/cpu/mp_init.c')
-rw-r--r--src/soc/intel/common/block/cpu/mp_init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/soc/intel/common/block/cpu/mp_init.c b/src/soc/intel/common/block/cpu/mp_init.c
index f52709dfce..dd5cc44845 100644
--- a/src/soc/intel/common/block/cpu/mp_init.c
+++ b/src/soc/intel/common/block/cpu/mp_init.c
@@ -134,7 +134,8 @@ static void init_cpus(void *unused)
microcode_patch = intel_microcode_find();
intel_microcode_load_unlocked(microcode_patch);
- soc_init_cpus(dev->link_list);
+ if (dev && dev->link_list)
+ soc_init_cpus(dev->link_list);
}
static void wrapper_x86_setup_mtrrs(void *unused)