mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
deb8df5077
commit
983ae8cee2
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue