diff options
author | Patrick Georgi <patrick@georgi-clan.de> | 2014-08-09 20:48:12 +0200 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2014-08-10 08:19:24 +0200 |
commit | f17c58b415219d889fe57a06be63f826f7a7c1b7 (patch) | |
tree | d74ac7894f2aa735fc8b55a9a6e39108cc51dbea /src | |
parent | 77c9508f58d93e44e30952618c1b95fbc7b6faaa (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>
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/intel/model_1067x/model_1067x_init.c | 3 |
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); |