Commit 4842b386 authored by Bjorn Helgaas's avatar Bjorn Helgaas

Merge branch 'remotes/lorenzo/pci/mediatek'

- Fix of_node_put() reference leak (Krzysztof Wilczyński)

* remotes/lorenzo/pci/mediatek:
  PCI: mediatek: Add missing of_node_put() to fix reference leak
parents b994a66a 42814c43
...@@ -1035,14 +1035,14 @@ static int mtk_pcie_setup(struct mtk_pcie *pcie) ...@@ -1035,14 +1035,14 @@ static int mtk_pcie_setup(struct mtk_pcie *pcie)
err = of_pci_get_devfn(child); err = of_pci_get_devfn(child);
if (err < 0) { if (err < 0) {
dev_err(dev, "failed to parse devfn: %d\n", err); dev_err(dev, "failed to parse devfn: %d\n", err);
return err; goto error_put_node;
} }
slot = PCI_SLOT(err); slot = PCI_SLOT(err);
err = mtk_pcie_parse_port(pcie, child, slot); err = mtk_pcie_parse_port(pcie, child, slot);
if (err) if (err)
return err; goto error_put_node;
} }
err = mtk_pcie_subsys_powerup(pcie); err = mtk_pcie_subsys_powerup(pcie);
...@@ -1058,6 +1058,9 @@ static int mtk_pcie_setup(struct mtk_pcie *pcie) ...@@ -1058,6 +1058,9 @@ static int mtk_pcie_setup(struct mtk_pcie *pcie)
mtk_pcie_subsys_powerdown(pcie); mtk_pcie_subsys_powerdown(pcie);
return 0; return 0;
error_put_node:
of_node_put(child);
return err;
} }
static int mtk_pcie_probe(struct platform_device *pdev) static int mtk_pcie_probe(struct platform_device *pdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment