Skip to content

Commit

Permalink
PCI: cpcihp: Add missing curly braces in cpci_configure_slot()
Browse files Browse the repository at this point in the history
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: 05b1250 ("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+
  • Loading branch information
Dan Carpenter authored and Bjorn Helgaas committed Mar 12, 2015
1 parent a1b7f2f commit bc3b5b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/pci/hotplug/cpci_hotplug_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,12 @@ int cpci_configure_slot(struct slot *slot)
}
parent = slot->dev->bus;

list_for_each_entry(dev, &parent->devices, bus_list)
list_for_each_entry(dev, &parent->devices, bus_list) {
if (PCI_SLOT(dev->devfn) != PCI_SLOT(slot->devfn))
continue;
if (pci_is_bridge(dev))
pci_hp_add_bridge(dev);
}


pci_assign_unassigned_bridge_resources(parent->self);
Expand Down

0 comments on commit bc3b5b4

Please sign in to comment.