diff options
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_glue.c')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 6a33ddcfa20b..a46b585fae31 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -675,7 +675,8 @@ static void acpiphp_check_bridge(struct acpiphp_bridge *bridge) if (bridge->is_going_away) return; - pm_runtime_get_sync(&bridge->pci_dev->dev); + if (bridge->pci_dev) + pm_runtime_get_sync(&bridge->pci_dev->dev); list_for_each_entry(slot, &bridge->slots, node) { struct pci_bus *bus = slot->bus; @@ -697,7 +698,8 @@ static void acpiphp_check_bridge(struct acpiphp_bridge *bridge) } } - pm_runtime_put(&bridge->pci_dev->dev); + if (bridge->pci_dev) + pm_runtime_put(&bridge->pci_dev->dev); } /* |