PCI: aer_inject: Fix return values when device not found
authorPrarit Bhargava <prarit@redhat.com>
Wed, 20 Mar 2013 12:04:43 +0000 (12:04 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 3 Apr 2013 23:08:45 +0000 (17:08 -0600)
commite82b14bdd390c534750a191f9936f842bab255d4
tree532b2a09ba445b84232d5674a1043121427b9325
parentf6161aa153581da4a3867a2d1a7caf4be19b6ec9
PCI: aer_inject: Fix return values when device not found

Currently the aer_inject driver returns -ENOTTY when the target PCIe
device root port is not found or if the device or root port doesn't
support AER.

In the case where the root port isn't found, the driver should return
-ENODEV, and in the other cases it should return -EPERM.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pcie/aer/aer_inject.c