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>
This commit is contained in:
Patrick Georgi 2014-08-09 20:48:12 +02:00
parent 77c9508f58
commit f17c58b415
1 changed files with 2 additions and 1 deletions

View File

@ -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);