PCI: handle positive error codes
authorGreg Thelen <gthelen@google.com>
Sun, 17 Apr 2011 15:20:32 +0000 (08:20 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 10 May 2011 22:43:36 +0000 (15:43 -0700)
commit34e3207205ef492451cc5c53694d4772a9728b9f
tree342c517ddb92fd18ea823f9f194447b96846c441
parentd97ecd819137118b4686a753415f93215a6edacf
PCI: handle positive error codes

Callers expect pci_user_{read,write}_config_*() to indicate errors by
returning negative values.  Prior to this change, the indicated routines
could return positive error codes (e.g. PCIBIOS_BAD_REGISTER_NUMBER)
which callers would mistakenly interpret as success.

This change converts any non-zero return from the mentioned routines
into unambiguous negative value return codes.

Signed-off-by: Greg Thelen <gthelen@google.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/access.c