1) Update some comment.

2) Add in handle for the out_of_resource cases
3) Add in Done label to clean up the code.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5853 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12
2008-09-09 02:39:44 +00:00
parent 599979d4ce
commit 6c857d668c
3 changed files with 29 additions and 17 deletions

View File

@@ -73,6 +73,10 @@ CoreConnectController (
AlignedRemainingDevicePath = NULL;
if (RemainingDevicePath != NULL) {
AlignedRemainingDevicePath = DuplicateDevicePath (RemainingDevicePath);
if (AlignedRemainingDevicePath == NULL) {
return EFI_OUT_OF_RESOURCES;
}
}
//
@@ -138,6 +142,9 @@ CoreConnectController (
// Allocate a handle buffer for ControllerHandle's children
//
ChildHandleBuffer = AllocatePool (ChildHandleCount * sizeof(EFI_HANDLE));
if (ChildHandleBuffer == NULL) {
return EFI_OUT_OF_RESOURCES;
}
//
// Fill in a handle buffer with ControllerHandle's children