Minor bug fix and robustness check improvement.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10168 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
rsun3
2010-03-03 09:40:16 +00:00
parent 9dbad162da
commit 60cf9cfc14
3 changed files with 10 additions and 6 deletions

View File

@@ -182,7 +182,8 @@ EhcInitSched (
);
if (Ehc->MemPool == NULL) {
goto ErrorExit;
Status = EFI_OUT_OF_RESOURCES;
goto ErrorExit1;
}
Status = EhcCreateHelpQ (Ehc);
@@ -223,9 +224,6 @@ EhcInitSched (
return EFI_SUCCESS;
ErrorExit:
PciIo->FreeBuffer (PciIo, Pages, Buf);
PciIo->Unmap (PciIo, Map);
if (Ehc->PeriodOne != NULL) {
UsbHcFreeMem (Ehc->MemPool, Ehc->PeriodOne, sizeof (EHC_QH));
Ehc->PeriodOne = NULL;
@@ -240,6 +238,11 @@ ErrorExit:
UsbHcFreeMem (Ehc->MemPool, Ehc->ShortReadStop, sizeof (EHC_QTD));
Ehc->ShortReadStop = NULL;
}
ErrorExit1:
PciIo->FreeBuffer (PciIo, Pages, Buf);
PciIo->Unmap (PciIo, Map);
return Status;
}