]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Fix return value from pci_user_{read,write}_config_*()
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Wed, 21 May 2014 05:23:30 +0000 (15:23 +1000)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 27 May 2014 23:10:16 +0000 (17:10 -0600)
commit521b30528f9ffe8bf5336d6dbebc57fbaa323018
tree0935d466ca429a5b61a9b82ed44a6c623175964f
parenta78c812861dd6b5e4a094ca26c619543658d6424
PCI: Fix return value from pci_user_{read,write}_config_*()

The PCI user-space config accessors pci_user_{read,write}_config_*() return
negative error numbers, which were introduced by commit b1da4cf07c25
("PCI: handle positive error codes").  That patch converted all positive
error numbers from platform-specific PCI config accessors to -EINVAL, which
means the callers don't know anything about the specific cause of the
failure.

The patch fixes the issue by converting the positive PCIBIOS_* error values
to generic negative error numbers with pcibios_err_to_errno().

[bhelgaas: changelog]
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Greg Thelen <gthelen@google.com>
drivers/pci/access.c
include/linux/pci.h