summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2011-08-08 09:23:51 +0000
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2011-08-08 09:23:51 +0000
commit9995c2e5d0e1f20111e905834eeefe135fe70ccb (patch)
tree8f92df9546af1db3d08948d350f87d49209feca7
parent7dc1329100c370992cdd430359512443bd1ee9f2 (diff)
downloadedk2-platforms-9995c2e5d0e1f20111e905834eeefe135fe70ccb.tar.xz
Add non null assertion before using the bridge instance.
Signed-off-by: niruiyu git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12095 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
index 810229ff61..eba5efdce2 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
@@ -810,6 +810,12 @@ PciHostBridgeResourceAllocator (
Mem64Bridge = FindResourceNode (RootBridgeDev, &Mem64Pool);
PMem64Bridge = FindResourceNode (RootBridgeDev, &PMem64Pool);
+ ASSERT (IoBridge != NULL);
+ ASSERT (Mem32Bridge != NULL);
+ ASSERT (PMem32Bridge != NULL);
+ ASSERT (Mem64Bridge != NULL);
+ ASSERT (PMem64Bridge != NULL);
+
//
// Program IO resources
//