diff options
Diffstat (limited to 'MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c')
-rw-r--r-- | MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c b/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c index 2086206404..d2e53300af 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c @@ -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;
}
|