* [PATCH] MIPS: Loongson64: Add of_node_put() before break
@ 2021-10-15 7:01 Wan Jiabing
2021-10-15 7:06 ` Huacai Chen
2021-10-18 16:18 ` Thomas Bogendoerfer
0 siblings, 2 replies; 3+ messages in thread
From: Wan Jiabing @ 2021-10-15 7:01 UTC (permalink / raw)
To: Huacai Chen, Jiaxun Yang, Thomas Bogendoerfer, linux-mips, linux-kernel
Cc: kael_w, Wan Jiabing
Fix following coccicheck warning:
./arch/mips/loongson64/init.c:174:1-22: WARNING: Function
for_each_node_by_name should have of_node_put() before break
Early exits from for_each_node_by_name should decrement the
node reference counter.
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
arch/mips/loongson64/init.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/mips/loongson64/init.c b/arch/mips/loongson64/init.c
index 4ac5ba80bbf6..ee8de1735b7c 100644
--- a/arch/mips/loongson64/init.c
+++ b/arch/mips/loongson64/init.c
@@ -179,6 +179,7 @@ static __init void reserve_pio_range(void)
if (of_range_parser_init(&parser, np)) {
pr_info("Failed to parse resources.\n");
+ of_node_put(np);
break;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: Loongson64: Add of_node_put() before break
2021-10-15 7:01 [PATCH] MIPS: Loongson64: Add of_node_put() before break Wan Jiabing
@ 2021-10-15 7:06 ` Huacai Chen
2021-10-18 16:18 ` Thomas Bogendoerfer
1 sibling, 0 replies; 3+ messages in thread
From: Huacai Chen @ 2021-10-15 7:06 UTC (permalink / raw)
To: Wan Jiabing
Cc: Jiaxun Yang, Thomas Bogendoerfer, open list:MIPS, LKML, kael_w
Reviewed-by: Huacai Chen <chenhuacai@kernel.org>
On Fri, Oct 15, 2021 at 3:01 PM Wan Jiabing <wanjiabing@vivo.com> wrote:
>
> Fix following coccicheck warning:
> ./arch/mips/loongson64/init.c:174:1-22: WARNING: Function
> for_each_node_by_name should have of_node_put() before break
>
> Early exits from for_each_node_by_name should decrement the
> node reference counter.
>
> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
> ---
> arch/mips/loongson64/init.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/mips/loongson64/init.c b/arch/mips/loongson64/init.c
> index 4ac5ba80bbf6..ee8de1735b7c 100644
> --- a/arch/mips/loongson64/init.c
> +++ b/arch/mips/loongson64/init.c
> @@ -179,6 +179,7 @@ static __init void reserve_pio_range(void)
>
> if (of_range_parser_init(&parser, np)) {
> pr_info("Failed to parse resources.\n");
> + of_node_put(np);
> break;
> }
>
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: Loongson64: Add of_node_put() before break
2021-10-15 7:01 [PATCH] MIPS: Loongson64: Add of_node_put() before break Wan Jiabing
2021-10-15 7:06 ` Huacai Chen
@ 2021-10-18 16:18 ` Thomas Bogendoerfer
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Bogendoerfer @ 2021-10-18 16:18 UTC (permalink / raw)
To: Wan Jiabing; +Cc: Huacai Chen, Jiaxun Yang, linux-mips, linux-kernel, kael_w
On Fri, Oct 15, 2021 at 03:01:22AM -0400, Wan Jiabing wrote:
> Fix following coccicheck warning:
> ./arch/mips/loongson64/init.c:174:1-22: WARNING: Function
> for_each_node_by_name should have of_node_put() before break
>
> Early exits from for_each_node_by_name should decrement the
> node reference counter.
>
> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
> ---
> arch/mips/loongson64/init.c | 1 +
> 1 file changed, 1 insertion(+)
applied to mips-next.
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] 3+ messages in thread
end of thread, other threads:[~2021-10-18 16:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15 7:01 [PATCH] MIPS: Loongson64: Add of_node_put() before break Wan Jiabing
2021-10-15 7:06 ` Huacai Chen
2021-10-18 16:18 ` 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.