}\r
\r
/**\r
- Merge continous entries whose type is EfiGcdMemoryTypeMemoryMappedIo.\r
+ Merge continuous entries whose type is EfiGcdMemoryTypeMemoryMappedIo.\r
\r
@param[in, out] GcdMemoryMap A pointer to the buffer in which firmware places\r
the current GCD memory map.\r
@param[in] Interface Points to the interface instance.\r
@param[in] Handle The handle on which the interface was installed.\r
\r
- @retval EFI_SUCCESS Notification runs successfully.\r
+ @retval EFI_SUCCESS Notification runs successfully.\r
+ @retval EFI_OUT_OF_RESOURCES No enough resources to save GCD MMIO map.\r
**/\r
EFI_STATUS\r
EFIAPI\r
MergeGcdMmioEntry (MemSpaceMap, &NumberOfDescriptors);\r
\r
mSmmIoLibGcdMemSpace = AllocateCopyPool (NumberOfDescriptors * sizeof (EFI_GCD_MEMORY_SPACE_DESCRIPTOR), MemSpaceMap);\r
- ASSERT_EFI_ERROR (Status);\r
- if (EFI_ERROR (Status)) {\r
+ ASSERT (mSmmIoLibGcdMemSpace != NULL);\r
+ if (mSmmIoLibGcdMemSpace == NULL) {\r
gBS->FreePool (MemSpaceMap);\r
- return Status;\r
+ return EFI_OUT_OF_RESOURCES;\r
}\r
\r
mSmmIoLibGcdMemNumberOfDesc = NumberOfDescriptors;\r