Commit b7144747 authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by Deepak Saxena

[PATCH] [BUGFIX] shpchp_pci.c: fix missing braces after if

Add missing braces around if statement, if not we will try to add devices
for an empty slot.
parent 55b0d6dd
......@@ -53,10 +53,11 @@ int shpchp_configure_device (struct controller* ctrl, struct pci_func* func)
/* Still NULL ? Well then scan for it ! */
if (func->pci_dev == NULL) {
num = pci_scan_slot(ctrl->pci_dev->subordinate, PCI_DEVFN(func->device, func->function));
if (num)
if (num) {
dbg("%s: subordiante %p number %x\n", __FUNCTION__, ctrl->pci_dev->subordinate,
ctrl->pci_dev->subordinate->number);
pci_bus_add_devices(ctrl->pci_dev->subordinate);
pci_bus_add_devices(ctrl->pci_dev->subordinate);
}
func->pci_dev = pci_find_slot(func->bus, PCI_DEVFN(func->device, func->function));
if (func->pci_dev == NULL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment