* [PATCH -next v2] net: dsa: rzn1-a5psw: add missing of_node_put() in a5psw_pcs_get()
@ 2022-06-30 1:41 Yang Yingliang
2022-07-01 4:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2022-06-30 1:41 UTC (permalink / raw)
To: linux-kernel, netdev, linux-renesas-soc
Cc: clement.leger, olteanv, f.fainelli, davem
of_parse_phandle() will increase the refcount of 'pcs_node', so add
of_node_put() before return from a5psw_pcs_get().
Fixes: 888cdb892b61 ("net: dsa: rzn1-a5psw: add Renesas RZ/N1 advanced 5 port switch driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
v2:
call of_node_put() after miic_create()
---
drivers/net/dsa/rzn1_a5psw.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/dsa/rzn1_a5psw.c b/drivers/net/dsa/rzn1_a5psw.c
index 3e910da98ae2..dece613ee881 100644
--- a/drivers/net/dsa/rzn1_a5psw.c
+++ b/drivers/net/dsa/rzn1_a5psw.c
@@ -917,12 +917,14 @@ static int a5psw_pcs_get(struct a5psw *a5psw)
}
a5psw->pcs[reg] = pcs;
+ of_node_put(pcs_node);
}
of_node_put(ports);
return 0;
free_pcs:
+ of_node_put(pcs_node);
of_node_put(port);
of_node_put(ports);
a5psw_pcs_free(a5psw);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next v2] net: dsa: rzn1-a5psw: add missing of_node_put() in a5psw_pcs_get()
2022-06-30 1:41 [PATCH -next v2] net: dsa: rzn1-a5psw: add missing of_node_put() in a5psw_pcs_get() Yang Yingliang
@ 2022-07-01 4:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-07-01 4:10 UTC (permalink / raw)
To: Yang Yingliang
Cc: linux-kernel, netdev, linux-renesas-soc, clement.leger, olteanv,
f.fainelli, davem
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 30 Jun 2022 09:41:53 +0800 you wrote:
> of_parse_phandle() will increase the refcount of 'pcs_node', so add
> of_node_put() before return from a5psw_pcs_get().
>
> Fixes: 888cdb892b61 ("net: dsa: rzn1-a5psw: add Renesas RZ/N1 advanced 5 port switch driver")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>
> [...]
Here is the summary with links:
- [-next,v2] net: dsa: rzn1-a5psw: add missing of_node_put() in a5psw_pcs_get()
https://git.kernel.org/netdev/net-next/c/5a24389457ba
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-01 4:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 1:41 [PATCH -next v2] net: dsa: rzn1-a5psw: add missing of_node_put() in a5psw_pcs_get() Yang Yingliang
2022-07-01 4:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).