diff options
author | Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> | 2020-03-27 17:33:24 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2020-03-28 11:50:56 -0500 |
commit | b5dfbeacf74865a8d62a4f70f501cdc61510f8e0 (patch) | |
tree | f351ba981bf79088646a262a98b869fe14a7eedc /drivers | |
parent | bb6d3fb354c5ee8d6bde2d576eb7220ea09862b9 (diff) |
PCI/ERR: Combine pci_channel_io_frozen cases
pcie_do_recovery() had two "if (state == pci_channel_io_frozen)" cases
right after each other. Combine them to make this easier to read. No
functional change intended.
Link: https://lore.kernel.org/r/20200317170654.GA23125@infradead.org
[bhelgaas: split from https://lore.kernel.org/r/a255fcb3a3fdebcd90f84e08b555f1786eb8eba2.1585000084.git.sathyanarayanan.kuppuswamy@linux.intel.com]
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/pcie/err.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c index 01dfc8bb7ca0..cf97e068e12a 100644 --- a/drivers/pci/pcie/err.c +++ b/drivers/pci/pcie/err.c @@ -203,14 +203,13 @@ void pcie_do_recovery(struct pci_dev *dev, enum pci_channel_state state, bus = dev->subordinate; pci_dbg(dev, "broadcast error_detected message\n"); - if (state == pci_channel_io_frozen) + if (state == pci_channel_io_frozen) { pci_walk_bus(bus, report_frozen_detected, &status); - else + if (reset_link(dev, service) != PCI_ERS_RESULT_RECOVERED) + goto failed; + } else { pci_walk_bus(bus, report_normal_detected, &status); - - if (state == pci_channel_io_frozen && - reset_link(dev, service) != PCI_ERS_RESULT_RECOVERED) - goto failed; + } if (status == PCI_ERS_RESULT_CAN_RECOVER) { status = PCI_ERS_RESULT_RECOVERED; |