summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2014-08-09 20:48:12 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2014-08-10 08:19:24 +0200
commitf17c58b415219d889fe57a06be63f826f7a7c1b7 (patch)
treed74ac7894f2aa735fc8b55a9a6e39108cc51dbea
parent77c9508f58d93e44e30952618c1b95fbc7b6faaa (diff)
cpu/intel/model_1067x: avoid null-pointer dereference
Change-Id: I7467d4a947e9e447707e1370b7e639ddddc20d3d Found-by: Coverity Scan Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/6570 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r--src/cpu/intel/model_1067x/model_1067x_init.c3
1 files changed, 2 insertions, 1 deletions
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);