diff options
author | Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> | 2020-05-26 16:18:26 -0700 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2020-06-01 12:03:22 -0500 |
commit | af10cce7ad515aa819ee8a4ef6777c28b19ddfb7 (patch) | |
tree | 024a13a5c63dec1c8212d06766774ef3523804d2 /drivers/pci | |
parent | 123f985aea0d603466518f041670d195eb2a4111 (diff) |
PCI/AER: Remove redundant dev->aer_cap checks
pcie_aer_get_firmware_first() checks dev->aer_cap, so we can remove
redundant dev->aer_cap checks in the callers.
Link: https://lore.kernel.org/r/d5ccc7a060ec9cdc234bdae7df8a0a4410f13f42.1590534843.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/pci')
-rw-r--r-- | drivers/pci/pcie/aer.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index ff41e44e56ee..61e8cb23e98b 100644 --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -253,13 +253,9 @@ void pci_aer_clear_device_status(struct pci_dev *dev) int pci_aer_clear_nonfatal_status(struct pci_dev *dev) { - int pos; + int pos = dev->aer_cap; u32 status, sev; - pos = dev->aer_cap; - if (!pos) - return -EIO; - if (!pcie_aer_is_native(dev)) return -EIO; @@ -276,13 +272,9 @@ EXPORT_SYMBOL_GPL(pci_aer_clear_nonfatal_status); void pci_aer_clear_fatal_status(struct pci_dev *dev) { - int pos; + int pos = dev->aer_cap; u32 status, sev; - pos = dev->aer_cap; - if (!pos) - return; - if (!pcie_aer_is_native(dev)) return; |