]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add the correct check for the return value before use them.
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 Apr 2010 02:59:29 +0000 (02:59 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 Apr 2010 02:59:29 +0000 (02:59 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10396 6f19259b-4bc3-4df7-8a09-765794883524

EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Forms.c
EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c
EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c

index bf0585264752f79538a0e31e58da413da063f343..c26862e0433c37af906b5ab3290bb8d4f6837147 100644 (file)
@@ -570,6 +570,7 @@ HiiThunkUpdateForm (
     if (Data->DataCount != 0) {\r
 \r
       ThunkContext = UefiHiiHandleToThunkContext (Private, UefiHiiHandle);\r
+      ASSERT (ThunkContext != NULL);\r
       Status = FwUpdateDataToUefiUpdateData (ThunkContext, Data, StartOpCodeHandle);\r
       ASSERT_EFI_ERROR (Status);\r
 \r
index e491a946caaea40923635a671d5fbdbe0348306c..e447dd96ca76b4062376346877beda6e11838bcd 100644 (file)
@@ -422,6 +422,7 @@ InitCpuStatePageTable (
   } else {\r
     ASSERT ((Pde & mPhyMask) == (HookAddress & ~(SIZE_2MB-1))); // 2MB Page Point to HookAddress\r
     PageTable = AllocatePages (1);\r
+    ASSERT (PageTable != NULL);\r
     Address = HookAddress & ~(SIZE_2MB-1);\r
     for (Index = 0; Index < 512; Index++) {\r
       PageTable[Index] = Address | BIT0 | BIT1; // Present and RW\r
index 4834036a6bef612e7d8d7c71fb39a891fa473e4f..ce491a747f4b85a228dbd996b1cbfab33344e95c 100644 (file)
@@ -470,7 +470,7 @@ SmmBaseThunkMain (
   // Assume only one instance of SMM Communication Protocol in the system\r
   // Locate SMM Communication Protocol\r
   //\r
-  gBS->LocateProtocol (&gEfiSmmCommunicationProtocolGuid, NULL, (VOID **) &mSmmCommunication);\r
+  Status = gBS->LocateProtocol (&gEfiSmmCommunicationProtocolGuid, NULL, (VOID **) &mSmmCommunication);\r
   ASSERT_EFI_ERROR (Status);\r
 \r
   //\r