Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1245127 > unrolled thread
| Started by | Julia Lawall <Julia.Lawall@lip6.fr> |
|---|---|
| First post | 2015-10-12 23:00 +0200 |
| Last post | 2015-10-13 00:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 3/3] ARM: EXYNOS: delete unneeded of_node_put Julia Lawall <Julia.Lawall@lip6.fr> - 2015-10-12 23:00 +0200
Re: [PATCH 3/3] ARM: EXYNOS: delete unneeded of_node_put Javier Martinez Canillas <javier@osg.samsung.com> - 2015-10-13 00:50 +0200
| From | Julia Lawall <Julia.Lawall@lip6.fr> |
|---|---|
| Date | 2015-10-12 23:00 +0200 |
| Subject | [PATCH 3/3] ARM: EXYNOS: delete unneeded of_node_put |
| Message-ID | <qiSmm-1Ya-15@gated-at.bofh.it> |
Device node iterators perform an of_node_put on each iteration, so putting
an of_node_put before going around to the next iteration results in a
double put.
Problem found using Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
arch/arm/mach-exynos/pm_domains.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index 4a87e86..7c21760 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -200,15 +200,15 @@ no_clk:
args.args_count = 0;
child_domain = of_genpd_get_from_provider(&args);
if (IS_ERR(child_domain))
- goto next_pd;
+ continue;
if (of_parse_phandle_with_args(np, "power-domains",
"#power-domain-cells", 0, &args) != 0)
- goto next_pd;
+ continue;
parent_domain = of_genpd_get_from_provider(&args);
if (IS_ERR(parent_domain))
- goto next_pd;
+ continue;
if (pm_genpd_add_subdomain(parent_domain, child_domain))
pr_warn("%s failed to add subdomain: %s\n",
@@ -216,8 +216,6 @@ no_clk:
else
pr_info("%s has as child subdomain: %s.\n",
parent_domain->name, child_domain->name);
-next_pd:
- of_node_put(np);
}
return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2015-10-13 00:50 +0200 |
| Message-ID | <qiU4O-4sr-21@gated-at.bofh.it> |
| In reply to | #1245127 |
Hello Julia, On 10/12/2015 10:43 PM, Julia Lawall wrote: > Device node iterators perform an of_node_put on each iteration, so putting > an of_node_put before going around to the next iteration results in a > double put. > > Problem found using Coccinelle. > > Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> > Krzysztof sent the same patch yesterday and was already applied: https://lkml.org/lkml/2015/10/12/688 Best regards, -- Javier Martinez Canillas Open Source Group Samsung Research America -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web