2020-07-23 01:23:35

by Yi Wang

[permalink] [raw]
Subject: [PATCH] ARM: milbeaut: Add missing of_node_put()

From: Liao Pingfang <[email protected]>

After finishing using device node got from of_find_compatible_node(),
of_node_put() needs to be called.

Signed-off-by: Liao Pingfang <[email protected]>
Signed-off-by: Yi Wang <[email protected]>
---
arch/arm/mach-milbeaut/platsmp.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-milbeaut/platsmp.c b/arch/arm/mach-milbeaut/platsmp.c
index 3ea880f..1f1ff21 100644
--- a/arch/arm/mach-milbeaut/platsmp.c
+++ b/arch/arm/mach-milbeaut/platsmp.c
@@ -53,6 +53,7 @@ static void m10v_smp_init(unsigned int max_cpus)
return;

m10v_smp_base = of_iomap(np, 0);
+ of_node_put(np);
if (!m10v_smp_base)
return;

--
2.9.5


2020-07-23 07:01:44

by Markus Elfring

[permalink] [raw]
Subject: Re: [PATCH] ARM: milbeaut: Add missing of_node_put()

> After finishing using device node got from of_find_compatible_node(),
> of_node_put() needs to be called.

* An imperative wording can be preferred for the change description,
can't it?

* Will the tag “Fixes” become helpful for the commit message?

Regards,
Markus