All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] mips: lantiq: Add missing of_node_put() in irq.c
@ 2022-06-21 15:41 Liang He
  2022-06-22  7:55 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 2+ messages in thread
From: Liang He @ 2022-06-21 15:41 UTC (permalink / raw)
  To: tsbogend, linux-mips, windhl

In icu_of_init(), of_find_compatible_node() will return a node
pointer with refcount incremented. We should use of_node_put()
when it is not used anymore.

Signed-off-by: Liang He <windhl@126.com>
---
 changelog:

 v2: fix bug intro-ed by v1, only one put needed.
 v1: add missing of_node_put()

 arch/mips/lantiq/irq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c
index b732495f138a..20622bf0a9b3 100644
--- a/arch/mips/lantiq/irq.c
+++ b/arch/mips/lantiq/irq.c
@@ -408,6 +408,7 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent)
 		if (!ltq_eiu_membase)
 			panic("Failed to remap eiu memory");
 	}
+	of_node_put(eiu_node);
 
 	return 0;
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] mips: lantiq: Add missing of_node_put() in irq.c
  2022-06-21 15:41 [PATCH v2] mips: lantiq: Add missing of_node_put() in irq.c Liang He
@ 2022-06-22  7:55 ` Thomas Bogendoerfer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2022-06-22  7:55 UTC (permalink / raw)
  To: Liang He; +Cc: linux-mips

On Tue, Jun 21, 2022 at 11:41:25PM +0800, Liang He wrote:
> In icu_of_init(), of_find_compatible_node() will return a node
> pointer with refcount incremented. We should use of_node_put()
> when it is not used anymore.
> 
> Signed-off-by: Liang He <windhl@126.com>
> ---
>  changelog:
> 
>  v2: fix bug intro-ed by v1, only one put needed.
>  v1: add missing of_node_put()
> 
>  arch/mips/lantiq/irq.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c
> index b732495f138a..20622bf0a9b3 100644
> --- a/arch/mips/lantiq/irq.c
> +++ b/arch/mips/lantiq/irq.c
> @@ -408,6 +408,7 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent)
>  		if (!ltq_eiu_membase)
>  			panic("Failed to remap eiu memory");
>  	}
> +	of_node_put(eiu_node);
>  
>  	return 0;
>  }
> -- 
> 2.25.1

applied to mips-fixes.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-22  8:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21 15:41 [PATCH v2] mips: lantiq: Add missing of_node_put() in irq.c Liang He
2022-06-22  7:55 ` Thomas Bogendoerfer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.