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>
This commit is contained in:
Kuppuswamy Sathyanarayanan 2020-05-26 16:18:26 -07:00 committed by Bjorn Helgaas
parent 123f985aea
commit af10cce7ad
1 changed files with 2 additions and 10 deletions

View File

@ -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;