Message ID | 1452243801-19479-2-git-send-email-bmeng.cn@gmail.com |
---|---|
State | Accepted |
Delegated to: | Tom Rini |
Headers | show |
On Fri, Jan 08, 2016 at 01:03:21AM -0800, Bin Meng wrote: > 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> Applied to u-boot/master, thanks!
diff --git a/drivers/pci/pcie_layerscape.c b/drivers/pci/pcie_layerscape.c index 58e88ae..99f9c83 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) {
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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)