提交 9642b78c 编写于 作者: B Bin Meng 提交者: Tom Rini

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: NFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: NBin Meng <bmeng.cn@gmail.com>
Tested-by: NFabio Estevam <fabio.estevam@nxp.com>
上级 e9cdf3b8
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册