soc/intel/cannonlake: Fix Coverity Scan report

Fix uninitialized variable OnModuleSpd, init bool with false first.

BUG=CID 1395330, 1395331
TEST=N/A

Change-Id: I050287370f7321ff9905937304bb3cc7f20d8c6a
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/28409
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Lijian Zhao 2018-08-31 10:16:41 -07:00 committed by Patrick Georgi
parent 79b990d965
commit 013ebbfa58
1 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ void cannonlake_memcfg_init(FSP_M_CONFIG *mem_cfg,
const struct cnl_mb_cfg *cnl_cfg,
const struct spd_info *spd)
{
bool OnModuleSpd;
bool OnModuleSpd = false;
/* Early Command Training Enabled */
mem_cfg->ECT = cnl_cfg->ect;
mem_cfg->DqPinsInterleaved = cnl_cfg->dq_pins_interleaved;
@ -109,7 +109,7 @@ void cannonlake_memcfg_init(FSP_M_CONFIG *mem_cfg,
for (int i = 0; i < ARRAY_SIZE(mem_cfg->SpdAddressTable); i++) {
if (spd->spd_smbus_address[i] != 0) {
mem_cfg->SpdAddressTable[i] = spd->spd_smbus_address[i];
OnModuleSpd = 1;
OnModuleSpd = true;
}
}