summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2016-01-08 01:03:20 -0800
committerTom Rini <trini@konsulko.com>2016-01-08 10:15:49 -0500
commit9642b78cdf3404ada759ccb7c7de461bf25597cb (patch)
tree0cbda1ea40c3e631b86c42804765b429ca6404ef /drivers/pci
parente9cdf3b85e966aabc88517225e9a23ec0cc4ea8a (diff)
downloadtalos-obmc-uboot-9642b78cdf3404ada759ccb7c7de461bf25597cb.tar.gz
talos-obmc-uboot-9642b78cdf3404ada759ccb7c7de461bf25597cb.zip
pci: imx: Adjust the return value when imx_pcie_addr_valid() fails
When trying to access non-existent/unsupported PCI devices in imx_pcie_read_config(), when imx_pcie_addr_valid() fails it returns error code and fills in the result with 0xffffffff manually. But it really should return zero to upper layer codes. Reported-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pcie_imx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c
index f1e189edd5..c14bb0aa82 100644
--- a/drivers/pci/pcie_imx.c
+++ b/drivers/pci/pcie_imx.c
@@ -381,7 +381,7 @@ static int imx_pcie_read_config(struct pci_controller *hose, pci_dev_t d,
ret = imx_pcie_addr_valid(d);
if (ret) {
*val = 0xffffffff;
- return ret;
+ return 0;
}
va_address = get_bus_address(d, where);
OpenPOWER on IntegriCloud