IN UINTN Size\r
)\r
{\r
- EFI_STATUS Status;\r
VOID *Buffer;\r
\r
- Status = gBS->AllocatePool (\r
- EfiBootServicesData,\r
- Size,\r
- (VOID *)&Buffer\r
- );\r
- if (EFI_ERROR (Status)) {\r
- ASSERT (FALSE);\r
- return NULL;\r
- }\r
+ Buffer = AllocatePool (Size);\r
+ ASSERT (Buffer != NULL);\r
+\r
return Buffer;\r
}\r
\r
}\r
\r
if (Status != EFI_ALREADY_STARTED) {\r
- Status = gBS->AllocatePool (\r
- EfiBootServicesData,\r
- sizeof (WIN_NT_BUS_DEVICE),\r
- (VOID *) &WinNtBusDevice\r
- );\r
- if (EFI_ERROR (Status)) {\r
- return Status;\r
+ WinNtBusDevice = AllocatePool (sizeof (WIN_NT_BUS_DEVICE));\r
+ if (WinNtBusDevice == NULL) {\r
+ return EFI_OUT_OF_RESOURCES;\r
}\r
\r
WinNtBusDevice->Signature = WIN_NT_BUS_DEVICE_SIGNATURE;\r
);\r
if (EFI_ERROR (Status)) {\r
FreeUnicodeStringTable (WinNtBusDevice->ControllerNameTable);\r
- gBS->FreePool (WinNtBusDevice);\r
+ FreePool (WinNtBusDevice);\r
return Status;\r
}\r
}\r
Count\r
);\r
if (WinNtDevice->DevicePath == NULL) {\r
- gBS->FreePool (WinNtDevice);\r
+ FreePool (WinNtDevice);\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
);\r
if (EFI_ERROR (Status)) {\r
FreeUnicodeStringTable (WinNtDevice->ControllerNameTable);\r
- gBS->FreePool (WinNtDevice);\r
+ FreePool (WinNtDevice);\r
} else {\r
//\r
// Open For Child Device\r
StartString = SubString;\r
}\r
\r
- gBS->FreePool (TempStr);\r
+ FreePool (TempStr);\r
}\r
\r
return EFI_SUCCESS;\r
\r
FreeUnicodeStringTable (WinNtBusDevice->ControllerNameTable);\r
\r
- gBS->FreePool (WinNtBusDevice);\r
+ FreePool (WinNtBusDevice);\r
\r
gBS->CloseProtocol (\r
ControllerHandle,\r
// Close the child handle\r
//\r
FreeUnicodeStringTable (WinNtDevice->ControllerNameTable);\r
- gBS->FreePool (WinNtDevice);\r
+ FreePool (WinNtDevice);\r
}\r
}\r
\r