OvmfPkg: PciHostBridgeLib: implement PciHostBridgeFreeRootBridges()

This function has no counterpart in OvmfPkg/PciHostBridgeDxe/, but the
PciHostBridgeLib class requires it.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Laszlo Ersek 2016-01-25 23:17:22 +01:00
parent 46e46eaf62
commit dc4d64670a
1 changed files with 11 additions and 1 deletions

View File

@ -215,7 +215,17 @@ PciHostBridgeFreeRootBridges (
UINTN Count
)
{
return;
if (Bridges == NULL && Count == 0) {
return;
}
ASSERT (Bridges != NULL && Count > 0);
do {
--Count;
UninitRootBridge (&Bridges[Count]);
} while (Count > 0);
FreePool (Bridges);
}