提交 c68febfd 编写于 作者: W Wei Yongjun 提交者: Lorenzo Pieralisi

PCI: dwc: artpec6: Fix return value check in artpec6_add_pcie_ep()

In case of error, the function devm_ioremap() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
上级 83f4f3f6
...@@ -485,8 +485,8 @@ static int artpec6_add_pcie_ep(struct artpec6_pcie *artpec6_pcie, ...@@ -485,8 +485,8 @@ static int artpec6_add_pcie_ep(struct artpec6_pcie *artpec6_pcie,
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dbi2"); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dbi2");
pci->dbi_base2 = devm_ioremap(dev, res->start, resource_size(res)); pci->dbi_base2 = devm_ioremap(dev, res->start, resource_size(res));
if (IS_ERR(pci->dbi_base2)) if (!pci->dbi_base2)
return PTR_ERR(pci->dbi_base2); return -ENOMEM;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "addr_space"); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "addr_space");
if (!res) if (!res)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册