]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PCI/AER: Remove redundant pci_is_pcie() checks
authorKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Tue, 26 May 2020 23:18:25 +0000 (16:18 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 1 Jun 2020 17:03:22 +0000 (12:03 -0500)
AER is a PCIe Extended Capability, so dev->aer_cap will only be set for
PCIe devices.  Remove redundant pci_is_pcie() checks.

Link: https://lore.kernel.org/r/361c622eabe5b845b8092e0bec04a3a2c262cb38.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>
drivers/pci/pcie/aer.c

index 803273ba30db398d401a71322f3d71d47e7cebc2..ff41e44e56ee39b9ccf0b5211472bc1c6f5d0f36 100644 (file)
@@ -139,9 +139,6 @@ static int enable_ecrc_checking(struct pci_dev *dev)
        int pos;
        u32 reg32;
 
-       if (!pci_is_pcie(dev))
-               return -ENODEV;
-
        pos = dev->aer_cap;
        if (!pos)
                return -ENODEV;
@@ -167,9 +164,6 @@ static int disable_ecrc_checking(struct pci_dev *dev)
        int pos;
        u32 reg32;
 
-       if (!pci_is_pcie(dev))
-               return -ENODEV;
-
        pos = dev->aer_cap;
        if (!pos)
                return -ENODEV;
@@ -315,9 +309,6 @@ int pci_aer_raw_clear_status(struct pci_dev *dev)
        u32 status;
        int port_type;
 
-       if (!pci_is_pcie(dev))
-               return -ENODEV;
-
        pos = dev->aer_cap;
        if (!pos)
                return -EIO;