* [PATCH 1/2] pinctrl: sirf: atlas7: Add missing 'of_node_put()'
@ 2016-12-20 5:40 Christophe JAILLET
2016-12-30 8:13 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2016-12-20 5:40 UTC (permalink / raw)
To: linus.walleij, baohua
Cc: linux-gpio, linux-arm-kernel, linux-kernel, kernel-janitors,
Christophe JAILLET
Reference to 'sys2pci_np' should be dropped in all cases here, not only in
error handling path.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/pinctrl/sirf/pinctrl-atlas7.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/sirf/pinctrl-atlas7.c b/drivers/pinctrl/sirf/pinctrl-atlas7.c
index 7f3041697813..f714f67c4b64 100644
--- a/drivers/pinctrl/sirf/pinctrl-atlas7.c
+++ b/drivers/pinctrl/sirf/pinctrl-atlas7.c
@@ -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;
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] pinctrl: sirf: atlas7: Add missing 'of_node_put()'
2016-12-20 5:40 [PATCH 1/2] pinctrl: sirf: atlas7: Add missing 'of_node_put()' Christophe JAILLET
@ 2016-12-30 8:13 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2016-12-30 8:13 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Barry Song, linux-gpio, linux-arm-kernel, linux-kernel, kernel-janitors
On Tue, Dec 20, 2016 at 6:40 AM, Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
> Reference to 'sys2pci_np' should be dropped in all cases here, not only in
> error handling path.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-30 8:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-20 5:40 [PATCH 1/2] pinctrl: sirf: atlas7: Add missing 'of_node_put()' Christophe JAILLET
2016-12-30 8:13 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).