Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7af355e6 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Linus Walleij
Browse files

pinctrl: sirf: atlas7: Add missing 'of_node_put()'



Reference to 'sys2pci_np' should be dropped in all cases here, not only in
error handling path.

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent c32c22ee
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -5420,14 +5420,15 @@ static int atlas7_pinmux_probe(struct platform_device *pdev)
	sys2pci_np = of_find_node_by_name(NULL, "sys2pci");
	if (!sys2pci_np)
		return -EINVAL;

	ret = of_address_to_resource(sys2pci_np, 0, &res);
	of_node_put(sys2pci_np);
	if (ret)
		return ret;

	pmx->sys2pci_base = devm_ioremap_resource(&pdev->dev, &res);
	if (IS_ERR(pmx->sys2pci_base)) {
		of_node_put(sys2pci_np);
	if (IS_ERR(pmx->sys2pci_base))
		return -ENOMEM;
	}

	pmx->dev = &pdev->dev;