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)
This commit is contained in:
committed by
Ronald G. Minnich
parent
fe2ae61906
commit
9b5480dd5e
@@ -341,11 +341,10 @@ static void mctGet_MaxLoadFreq(struct DCTStatStruc *pDCTstat)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
sDCTStruct *pDCTData = pDCTstat->C_DCTPtr[i];
|
|
||||||
highest_rank_count[i] = 0x0;
|
highest_rank_count[i] = 0x0;
|
||||||
for (dimm = 0; dimm < MAX_DIMMS_SUPPORTED; dimm++) {
|
for (dimm = 0; dimm < MAX_DIMMS_SUPPORTED; dimm++) {
|
||||||
if (pDCTData->DimmRanks[dimm] > highest_rank_count[i])
|
if (pDCTstat->DimmRanks[dimm] > highest_rank_count[i])
|
||||||
highest_rank_count[i] = pDCTData->DimmRanks[dimm];
|
highest_rank_count[i] = pDCTstat->DimmRanks[dimm];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user