PCI: Handle error return from pci_reset_bridge_secondary_bus()
Commit01fd61c0b9
("PCI: Add a return type for pci_reset_bridge_secondary_bus()") added a return value to the function to return if a device is accessible following a reset. Callers are not checking the value. Pass error code up high in the stack if device is not accessible. Fixes:01fd61c0b9
("PCI: Add a return type for pci_reset_bridge_secondary_bus()") Signed-off-by: Sinan Kaya <okaya@codeaurora.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:

committed by
Bjorn Helgaas

parent
51259d0022
commit
1842623850
@@ -728,6 +728,7 @@ int pciehp_reset_slot(struct slot *slot, int probe)
|
||||
struct controller *ctrl = slot->ctrl;
|
||||
struct pci_dev *pdev = ctrl_dev(ctrl);
|
||||
u16 stat_mask = 0, ctrl_mask = 0;
|
||||
int rc;
|
||||
|
||||
if (probe)
|
||||
return 0;
|
||||
@@ -745,7 +746,7 @@ int pciehp_reset_slot(struct slot *slot, int probe)
|
||||
if (pciehp_poll_mode)
|
||||
del_timer_sync(&ctrl->poll_timer);
|
||||
|
||||
pci_reset_bridge_secondary_bus(ctrl->pcie->port);
|
||||
rc = pci_reset_bridge_secondary_bus(ctrl->pcie->port);
|
||||
|
||||
pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, stat_mask);
|
||||
pcie_write_cmd_nowait(ctrl, ctrl_mask, ctrl_mask);
|
||||
@@ -753,7 +754,7 @@ int pciehp_reset_slot(struct slot *slot, int probe)
|
||||
pci_pcie_cap(ctrl->pcie->port) + PCI_EXP_SLTCTL, ctrl_mask);
|
||||
if (pciehp_poll_mode)
|
||||
int_poll_timeout(&ctrl->poll_timer);
|
||||
return 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
int pcie_init_notification(struct controller *ctrl)
|
||||
|
Reference in New Issue
Block a user