]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
pci: layerscape: Adjust the return value when ls_pcie_addr_valid() fails
authorBin Meng <bmeng.cn@gmail.com>
Fri, 8 Jan 2016 09:03:21 +0000 (01:03 -0800)
committerTom Rini <trini@konsulko.com>
Fri, 8 Jan 2016 15:15:49 +0000 (10:15 -0500)
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 <bmeng.cn@gmail.com>
drivers/pci/pcie_layerscape.c

index 58e88ae45e37650ebf7288c219c554846d8d4bef..99f9c83fa41f607789b29b81890a9c8394b6a0e8 100644 (file)
@@ -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;
 
        if (ls_pcie_addr_valid(hose, d)) {
                *val = 0xffffffff;
-               return -EINVAL;
+               return 0;
        }
 
        if (PCI_BUS(d) == hose->first_busno) {
        }
 
        if (PCI_BUS(d) == hose->first_busno) {