northbridge/amd/amdmct: Fix crash on startup due to NULL pointer access

Change-Id: I47089f2ad886a6fda4e0cd4472efd975bb8e06c5
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: http://review.coreboot.org/11995
Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
Tested-by: build bot (Jenkins)
diff --git a/src/northbridge/amd/amdmct/wrappers/mcti_d.c b/src/northbridge/amd/amdmct/wrappers/mcti_d.c
index fecda0b..45f8177 100644
--- a/src/northbridge/amd/amdmct/wrappers/mcti_d.c
+++ b/src/northbridge/amd/amdmct/wrappers/mcti_d.c
@@ -341,11 +341,10 @@
 	}
 
 	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