From 9b5480dd5e6b2f84b4c05e9ce91a35cee4f9cc64 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 20 Jun 2015 14:40:56 -0500 Subject: northbridge/amd/amdmct: Fix crash on startup due to NULL pointer access Change-Id: I47089f2ad886a6fda4e0cd4472efd975bb8e06c5 Signed-off-by: Timothy Pearson Reviewed-on: http://review.coreboot.org/11995 Reviewed-by: Edward O'Callaghan Tested-by: build bot (Jenkins) --- src/northbridge/amd/amdmct/wrappers/mcti_d.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/northbridge/amd') diff --git a/src/northbridge/amd/amdmct/wrappers/mcti_d.c b/src/northbridge/amd/amdmct/wrappers/mcti_d.c index fecda0b24d..45f817791b 100644 --- a/src/northbridge/amd/amdmct/wrappers/mcti_d.c +++ b/src/northbridge/amd/amdmct/wrappers/mcti_d.c @@ -341,11 +341,10 @@ static void mctGet_MaxLoadFreq(struct DCTStatStruc *pDCTstat) } for (i = 0; i < 2; i++) { - sDCTStruct *pDCTData = pDCTstat->C_DCTPtr[i]; highest_rank_count[i] = 0x0; for (dimm = 0; dimm < MAX_DIMMS_SUPPORTED; dimm++) { - if (pDCTData->DimmRanks[dimm] > highest_rank_count[i]) - highest_rank_count[i] = pDCTData->DimmRanks[dimm]; + if (pDCTstat->DimmRanks[dimm] > highest_rank_count[i]) + highest_rank_count[i] = pDCTstat->DimmRanks[dimm]; } } #endif -- cgit v1.2.3