From: Bin Meng Date: Fri, 8 Jan 2016 09:03:20 +0000 (-0800) Subject: pci: imx: Adjust the return value when imx_pcie_addr_valid() fails X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=9642b78cdf3404ada759ccb7c7de461bf25597cb;p=u-boot.git 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 Signed-off-by: Bin Meng Tested-by: Fabio Estevam --- 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);