]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c
Retire PciHotplugDeviceGuid.
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Pci / PciBusDxe / PciDeviceSupport.c
index d461aef4d0dff846eeeb8b825613c940b09e746d..e205fe9dc88cb696d32f9b4dcbb350f18aee7f73 100644 (file)
@@ -378,12 +378,6 @@ RegisterPciDevice (
     return Status;\r
   }\r
 \r
-  //\r
-  // Install Pccard Hotplug GUID for Pccard device so that\r
-  // to notify CardBus driver to stop the device when de-register happens\r
-  //\r
-  InstallPciHotplugGuid (PciIoDevice);\r
-\r
   if (Handle != NULL) {\r
     *Handle = PciIoDevice->Handle;\r
   }\r
@@ -505,10 +499,6 @@ DeRegisterPciDevice (
         CurrentLink = CurrentLink->ForwardLink;\r
       }\r
     }\r
-    //\r
-    // Uninstall Pccard Hotplug GUID for Pccard device\r
-    //\r
-    UninstallPciHotplugGuid (PciIoDevice);\r
 \r
     //\r
     // Close the child handle\r
@@ -1202,7 +1192,11 @@ GetHpcPciAddressFromRootBridge (
     return EFI_NOT_FOUND;\r
   }\r
 \r
-  *PciAddress = EFI_PCI_ADDRESS (Temp->BusNumber, Temp->DeviceNumber, Temp->FunctionNumber, 0);\r
+  if (Temp != NULL) {\r
+    *PciAddress = EFI_PCI_ADDRESS (Temp->BusNumber, Temp->DeviceNumber, Temp->FunctionNumber, 0);\r
+  } else {\r
+    return EFI_NOT_FOUND;\r
+  }\r
 \r
   return EFI_SUCCESS;\r
 \r