Message ID | 20200615073225.24061-8-refactormyself@gmail.com |
---|---|
State | New |
Headers | show |
Series | PCI: Align return values of PCIe capability and PCI accessors | expand |
diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index 95d480a52078..53e2ecb64c72 100644 --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -365,11 +365,15 @@ EXPORT_SYMBOL_GPL(pci_enable_pcie_error_reporting); int pci_disable_pcie_error_reporting(struct pci_dev *dev) { + int rc; + if (pcie_aer_get_firmware_first(dev)) return -EIO; - return pcie_capability_clear_word(dev, PCI_EXP_DEVCTL, + rc = pcie_capability_clear_word(dev, PCI_EXP_DEVCTL, PCI_EXP_AER_FLAGS); + + return pcibios_err_to_errno(rc); } EXPORT_SYMBOL_GPL(pci_disable_pcie_error_reporting);