diff options
author | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-06 03:58:04 +0000 |
---|---|---|
committer | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-06 03:58:04 +0000 |
commit | 311a71b2998b6f8c35c09c7a59a3d589dfa1c1e0 (patch) | |
tree | 960f02f69a401fa59c22b5481e8c8a15c0e4c9d3 /MdeModulePkg/Core | |
parent | 18e81d77cf2fdb8912f43dfdae40b9793a7c98da (diff) | |
download | edk2-platforms-311a71b2998b6f8c35c09c7a59a3d589dfa1c1e0.tar.xz |
Cleanup K8 warning.
We need judge return status of CoreGetMemorySpaceMap() to avoid the generation of NULL pointer of MemorySpaceMap.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7448 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core')
-rw-r--r-- | MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c index 6df0a9f3cd..c9aad1ce3a 100644 --- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c +++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c @@ -2151,6 +2151,8 @@ CoreInitializeGcdServices ( // Add and allocate the remaining unallocated system memory to the memory services.
//
Status = CoreGetMemorySpaceMap (&NumberOfDescriptors, &MemorySpaceMap);
+ ASSERT (Status == EFI_SUCCESS);
+
for (Index = 0; Index < NumberOfDescriptors; Index++) {
if (MemorySpaceMap[Index].GcdMemoryType == EfiGcdMemoryTypeSystemMemory) {
if (MemorySpaceMap[Index].ImageHandle == NULL) {
|