Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1544908 > unrolled thread
| Started by | Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
|---|---|
| First post | 2016-12-20 06:50 +0100 |
| Last post | 2016-12-30 09:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/2] pinctrl: sirf: atlas7: Add missing 'of_node_put()' Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-12-20 06:50 +0100
Re: [PATCH 1/2] pinctrl: sirf: atlas7: Add missing 'of_node_put()' Linus Walleij <linus.walleij@linaro.org> - 2016-12-30 09:20 +0100
| From | Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
|---|---|
| Date | 2016-12-20 06:50 +0100 |
| Subject | [PATCH 1/2] pinctrl: sirf: atlas7: Add missing 'of_node_put()' |
| Message-ID | <sQltf-1oo-13@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2016-12-30 09:20 +0100 |
| Message-ID | <sU0zT-1QO-11@gated-at.bofh.it> |
| In reply to | #1544908 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web