nb/intel/sandybridge: Fix unitialized variable issue

Cherry-picked from main branch using commit caa0c0e71a.

Original commit message:

commit 1e9601c5ef ("nb/intel/sandybridge: Standardize MRC vs. native
SPD mapping API") introduced an uninitialized variable issue.

Change-Id: I41b081dc4c961acc04423067e29e0eabe5f17539
Found-by: Coverity CID 1524317
Original-Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Original-Reviewed-on: https://review.coreboot.org/c/coreboot/+/79093
Original-Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79231
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
This commit is contained in:
Jeremy Compostella 2023-11-16 08:48:23 -08:00 committed by Martin L Roth
commit 2ff2409037

View file

@ -315,7 +315,7 @@ static void devicetree_fill_pei_data(struct pei_data *pei_data)
static void spd_fill_pei_data(struct pei_data *pei_data)
{
struct spd_info spdi = {0};
unsigned int i, have_memory_down;
unsigned int i, have_memory_down = 0;
mb_get_spd_map(&spdi);