summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.c b/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.c
index c3d46f60be..3794f888e1 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.c
@@ -250,6 +250,11 @@ UsbHcGetPciAddressForHostMem (
}
ASSERT ((Block != NULL));
+
+ if (Block == NULL) {
+ return 0;
+ }
+
//
// calculate the pci memory address for host memory address.
//
@@ -536,6 +541,10 @@ UsbHcFreeMem (
//
ASSERT (Block != NULL);
+ if (Block == NULL) {
+ return;
+ }
+
//
// Release the current memory block if it is empty and not the head
//