From f17c58b415219d889fe57a06be63f826f7a7c1b7 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sat, 9 Aug 2014 20:48:12 +0200 Subject: cpu/intel/model_1067x: avoid null-pointer dereference Change-Id: I7467d4a947e9e447707e1370b7e639ddddc20d3d Found-by: Coverity Scan Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/6570 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan Reviewed-by: Stefan Reinauer --- src/cpu/intel/model_1067x/model_1067x_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/cpu/intel') diff --git a/src/cpu/intel/model_1067x/model_1067x_init.c b/src/cpu/intel/model_1067x/model_1067x_init.c index 4779a517fb..8e44c784bc 100644 --- a/src/cpu/intel/model_1067x/model_1067x_init.c +++ b/src/cpu/intel/model_1067x/model_1067x_init.c @@ -149,7 +149,8 @@ static void configure_p_states(const char stepping, const char cores) (lapic && lapic->chip_info) ? lapic->chip_info : NULL; msr = rdmsr(MSR_EXTENDED_CONFIG); - if (conf->slfm && (msr.lo & (1 << 27))) /* Super LFM supported? */ + /* Super LFM supported? */ + if (conf && conf->slfm && (msr.lo & (1 << 27))) msr.lo |= (1 << 28); /* Enable Super LFM. */ wrmsr(MSR_EXTENDED_CONFIG, msr); -- cgit v1.2.3