提交 7ba34ff0 编写于 作者: B Bin Meng 提交者: Tom Rini

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: NBin Meng <bmeng.cn@gmail.com>
上级 9642b78c
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册