summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
index 9b3224e..71d624f 100644
--- a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
+++ b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c
@@ -283,9 +283,8 @@ AllocateBootPerformanceTable (
SmmCommData->Function = SMM_FPDT_FUNCTION_GET_BOOT_RECORD_SIZE;
SmmCommData->BootRecordData = NULL;
Status = Communication->Communicate (Communication, SmmBootRecordCommBuffer, &CommSize);
- ASSERT_EFI_ERROR (Status);
- if (!EFI_ERROR (SmmCommData->ReturnStatus) && SmmCommData->BootRecordSize != 0) {
+ if (!EFI_ERROR (Status) && !EFI_ERROR (SmmCommData->ReturnStatus) && SmmCommData->BootRecordSize != 0) {
//
// Get all boot records
//
@@ -317,7 +316,7 @@ AllocateBootPerformanceTable (
// Boot Performance table includes BasicBoot record, and one or more appended Boot Records.
//
BootPerformanceDataSize = sizeof (BOOT_PERFORMANCE_TABLE) + mPerformanceLength + PcdGet32 (PcdExtFpdtBootRecordPadSize);
- if (SmmCommData != NULL) {
+ if (SmmCommData != NULL && SmmBootRecordData != NULL) {
BootPerformanceDataSize += SmmBootRecordDataSize;
}