From: Bin Meng Date: Fri, 8 Jan 2016 09:03:21 +0000 (-0800) Subject: pci: layerscape: Adjust the return value when ls_pcie_addr_valid() fails X-Git-Tag: v2016.01~6 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7ba34ff09f1ef105521f914e4ad4e4ac19975bac;p=oweals%2Fu-boot.git pci: layerscape: Adjust the return value when ls_pcie_addr_valid() fails When trying to access non-existent/unsupported PCI devices in ls_pcie_read_config(), when ls_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. Signed-off-by: Bin Meng --- diff --git a/drivers/pci/pcie_layerscape.c b/drivers/pci/pcie_layerscape.c index 58e88ae45e..99f9c83fa4 100644 --- a/drivers/pci/pcie_layerscape.c +++ b/drivers/pci/pcie_layerscape.c @@ -314,7 +314,7 @@ static int ls_pcie_read_config(struct pci_controller *hose, pci_dev_t d, if (ls_pcie_addr_valid(hose, d)) { *val = 0xffffffff; - return -EINVAL; + return 0; } if (PCI_BUS(d) == hose->first_busno) {