summaryrefslogtreecommitdiffstats
path: root/EdkCompatibilityPkg
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-04-22 02:59:29 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-04-22 02:59:29 +0000
commit983ae8cee2db3a26ac977753fba56fee5acee6a6 (patch)
tree576801a6652b5a31b3ce9c0b5d0517dd2a72a849 /EdkCompatibilityPkg
parentdeb8df50779e9e91fb77e6a5edf84d1ff994da79 (diff)
downloadedk2-983ae8cee2db3a26ac977753fba56fee5acee6a6.tar.gz
edk2-983ae8cee2db3a26ac977753fba56fee5acee6a6.tar.bz2
edk2-983ae8cee2db3a26ac977753fba56fee5acee6a6.zip
Add the correct check for the return value before use them.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10396 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg')
-rw-r--r--EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Forms.c1
-rw-r--r--EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c1
-rw-r--r--EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c2
3 files changed, 3 insertions, 1 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Forms.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Forms.c
index bf05852647..c26862e043 100644
--- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Forms.c
+++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Forms.c
@@ -570,6 +570,7 @@ HiiThunkUpdateForm (
if (Data->DataCount != 0) {
ThunkContext = UefiHiiHandleToThunkContext (Private, UefiHiiHandle);
+ ASSERT (ThunkContext != NULL);
Status = FwUpdateDataToUefiUpdateData (ThunkContext, Data, StartOpCodeHandle);
ASSERT_EFI_ERROR (Status);
diff --git a/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c b/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c
index e491a946ca..e447dd96ca 100644
--- a/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c
+++ b/EdkCompatibilityPkg/Compatibility/SmmBaseHelper/SmmBaseHelper.c
@@ -422,6 +422,7 @@ InitCpuStatePageTable (
} else {
ASSERT ((Pde & mPhyMask) == (HookAddress & ~(SIZE_2MB-1))); // 2MB Page Point to HookAddress
PageTable = AllocatePages (1);
+ ASSERT (PageTable != NULL);
Address = HookAddress & ~(SIZE_2MB-1);
for (Index = 0; Index < 512; Index++) {
PageTable[Index] = Address | BIT0 | BIT1; // Present and RW
diff --git a/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c b/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c
index 4834036a6b..ce491a747f 100644
--- a/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c
+++ b/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c
@@ -470,7 +470,7 @@ SmmBaseThunkMain (
// Assume only one instance of SMM Communication Protocol in the system
// Locate SMM Communication Protocol
//
- gBS->LocateProtocol (&gEfiSmmCommunicationProtocolGuid, NULL, (VOID **) &mSmmCommunication);
+ Status = gBS->LocateProtocol (&gEfiSmmCommunicationProtocolGuid, NULL, (VOID **) &mSmmCommunication);
ASSERT_EFI_ERROR (Status);
//