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>
This commit is contained in:
parent
b9f80fdc42
commit
0f6f1d9fca
1 changed files with 1 additions and 1 deletions
|
@ -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 */
|
/* The device might not support AER */
|
||||||
if (!pos)
|
if (!pos)
|
||||||
return 1;
|
return 0;
|
||||||
|
|
||||||
if (info->severity == AER_CORRECTABLE) {
|
if (info->severity == AER_CORRECTABLE) {
|
||||||
pci_read_config_dword(dev, pos + PCI_ERR_COR_STATUS,
|
pci_read_config_dword(dev, pos + PCI_ERR_COR_STATUS,
|
||||||
|
|
Loading…
Reference in a new issue