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:
parent
79b990d965
commit
013ebbfa58
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue