* [PATCH] ARM: uniphier: correct the call order of of_node_put()
@ 2016-04-15 10:48 Masahiro Yamada
2016-04-25 22:12 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2016-04-15 10:48 UTC (permalink / raw)
To: linux-arm-kernel
Put nodes after of_address_to_resource() in case the nodes might be
released while parsing in them.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm/mach-uniphier/platsmp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-uniphier/platsmp.c b/arch/arm/mach-uniphier/platsmp.c
index db04142..e802ca8 100644
--- a/arch/arm/mach-uniphier/platsmp.c
+++ b/arch/arm/mach-uniphier/platsmp.c
@@ -99,16 +99,16 @@ static int __init uniphier_smp_prepare_trampoline(unsigned int max_cpus)
int ret;
np = of_find_compatible_node(NULL, NULL, "socionext,uniphier-smpctrl");
- of_node_put(np);
ret = of_address_to_resource(np, 0, &res);
+ of_node_put(np);
if (!ret) {
rom_rsv2_phys = res.start + UNIPHIER_SMPCTRL_ROM_RSV2;
} else {
/* try old binding too */
np = of_find_compatible_node(NULL, NULL,
"socionext,uniphier-system-bus-controller");
- of_node_put(np);
ret = of_address_to_resource(np, 1, &res);
+ of_node_put(np);
if (ret) {
pr_err("failed to get resource of SMP control\n");
return ret;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] ARM: uniphier: correct the call order of of_node_put()
2016-04-15 10:48 [PATCH] ARM: uniphier: correct the call order of of_node_put() Masahiro Yamada
@ 2016-04-25 22:12 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2016-04-25 22:12 UTC (permalink / raw)
To: linux-arm-kernel
On Friday 15 April 2016 19:48:29 Masahiro Yamada wrote:
> Put nodes after of_address_to_resource() in case the nodes might be
> released while parsing in them.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Applied to next/soc, thanks
Arnd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-25 22:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-15 10:48 [PATCH] ARM: uniphier: correct the call order of of_node_put() Masahiro Yamada
2016-04-25 22:12 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox