diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-02-25 08:23:22 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-03-12 12:22:10 -0400 |
commit | bc3b5b47c80da8838758731d423179262c9c36ec (patch) | |
tree | 007b9cd3a86b737cff0d19442af9a5101487604b | |
parent | a1b7f2f6367944d445c6853035830a35c6343939 (diff) |
PCI: cpcihp: Add missing curly braces in cpci_configure_slot()
I don't have this hardware but it looks like we weren't adding bridge
devices as intended. Maybe the bridge is always the last device?
Fixes: 05b125004815 ("PCI: cpcihp: Iterate over all devices in slot, not functions 0-7")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yijing Wang <wangyijing@huawei.com>
CC: stable@vger.kernel.org # v3.9+
-rw-r--r-- | drivers/pci/hotplug/cpci_hotplug_pci.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c index 7d48ecae6695..788db48dbbad 100644 --- a/drivers/pci/hotplug/cpci_hotplug_pci.c +++ b/drivers/pci/hotplug/cpci_hotplug_pci.c | |||
@@ -286,11 +286,12 @@ int cpci_configure_slot(struct slot *slot) | |||
286 | } | 286 | } |
287 | parent = slot->dev->bus; | 287 | parent = slot->dev->bus; |
288 | 288 | ||
289 | list_for_each_entry(dev, &parent->devices, bus_list) | 289 | list_for_each_entry(dev, &parent->devices, bus_list) { |
290 | if (PCI_SLOT(dev->devfn) != PCI_SLOT(slot->devfn)) | 290 | if (PCI_SLOT(dev->devfn) != PCI_SLOT(slot->devfn)) |
291 | continue; | 291 | continue; |
292 | if (pci_is_bridge(dev)) | 292 | if (pci_is_bridge(dev)) |
293 | pci_hp_add_bridge(dev); | 293 | pci_hp_add_bridge(dev); |
294 | } | ||
294 | 295 | ||
295 | 296 | ||
296 | pci_assign_unassigned_bridge_resources(parent->self); | 297 | pci_assign_unassigned_bridge_resources(parent->self); |