diff --git a/MsWheaPkg/Library/MsWheaEarlyStorageLib/MsWheaEarlyStorageLib.c b/MsWheaPkg/Library/MsWheaEarlyStorageLib/MsWheaEarlyStorageLib.c index d38d01f97c..8ac6c527ea 100644 --- a/MsWheaPkg/Library/MsWheaEarlyStorageLib/MsWheaEarlyStorageLib.c +++ b/MsWheaPkg/Library/MsWheaEarlyStorageLib/MsWheaEarlyStorageLib.c @@ -63,7 +63,7 @@ __MsWheaCMOSRawRead ( for (i = 0; i < Size; i++) { mIndex = Offset + i; - if ((mIndex >= 0) && (mIndex <= 127)) { + if (mIndex <= 127) { IoWrite8 (PCAT_RTC_LO_ADDRESS_PORT, mIndex); mBuf[i] = IoRead8 (PCAT_RTC_LO_DATA_PORT); } else { @@ -114,7 +114,7 @@ __MsWheaCMOSRawWrite ( for (i = 0; i < Size; i++) { mIndex = Offset + i; - if ((mIndex >= 0) && (mIndex <= 127)) { + if (mIndex <= 127) { IoWrite8 (PCAT_RTC_LO_ADDRESS_PORT, mIndex); IoWrite8 (PCAT_RTC_LO_DATA_PORT, mBuf[i]); } else { @@ -160,7 +160,7 @@ __MsWheaCMOSRawClear ( for (i = 0; i < Size; i++) { mIndex = Offset + i; - if ((mIndex >= 0) && (mIndex <= 127)) { + if (mIndex <= 127) { IoWrite8 (PCAT_RTC_LO_ADDRESS_PORT, mIndex); IoWrite8 (PCAT_RTC_LO_DATA_PORT, PcdGet8 (PcdMsWheaEarlyStorageDefaultValue)); } else {