diff options
author | Keith Busch <keith.busch@intel.com> | 2017-12-19 14:06:40 -0700 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-01-11 18:41:05 -0600 |
commit | 0f6f1d9fca4ad91ce9b30dc0aa847b0947786261 (patch) | |
tree | a0f3467479cf517bf6fca9d2cba138d8bb8769c7 /drivers/pci/pcie | |
parent | b9f80fdc4244b417154ec30d3bc7ec3e76085634 (diff) | |
download | linux-stable-0f6f1d9fca4ad91ce9b30dc0aa847b0947786261.tar.gz linux-stable-0f6f1d9fca4ad91ce9b30dc0aa847b0947786261.tar.bz2 linux-stable-0f6f1d9fca4ad91ce9b30dc0aa847b0947786261.zip |
PCI/AER: Return error if AER is not supported
get_device_error_info() reads error information from registers in the AER
capability. If we call it for a device that has no AER capability, it
should return an error, but previously it returned success.
Return 0 (error) if the device doesn't have an AER capability.
Signed-off-by: Keith Busch <keith.busch@intel.com>
[bhelgaas: changelog]
Signed-off-by: Bjorn Helgaas <helgaas@kernel.org>
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index 3e354f224422..92ec13a09a2a 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c @@ -661,7 +661,7 @@ static int get_device_error_info(struct pci_dev *dev, struct aer_err_info *info) /* The device might not support AER */ if (!pos) - return 1; + return 0; if (info->severity == AER_CORRECTABLE) { pci_read_config_dword(dev, pos + PCI_ERR_COR_STATUS, |