* [PATCH] soc: rockchip: grf: Fix device node reference leak in rockchip_grf_init()
@ 2026-02-16 20:11 Felix Gu
2026-02-21 15:28 ` Heiko Stübner
0 siblings, 1 reply; 2+ messages in thread
From: Felix Gu @ 2026-02-16 20:11 UTC (permalink / raw)
To: Heiko Stuebner, Shawn Lin
Cc: linux-arm-kernel, linux-rockchip, linux-kernel, Felix Gu
In rockchip_grf_init(), when syscon_node_to_regmap fails, it returns
without calling of_node_put(), which causes a reference leak.
Add the missing of_node_put() call to fix it.
Fixes: 75fb63ae0312 ("soc: rockchip: grf: Support multiple grf to be handled")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
drivers/soc/rockchip/grf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/soc/rockchip/grf.c b/drivers/soc/rockchip/grf.c
index 04937c40da47..b459607c118a 100644
--- a/drivers/soc/rockchip/grf.c
+++ b/drivers/soc/rockchip/grf.c
@@ -231,6 +231,7 @@ static int __init rockchip_grf_init(void)
grf = syscon_node_to_regmap(np);
if (IS_ERR(grf)) {
pr_err("%s: could not get grf syscon\n", __func__);
+ of_node_put(np);
return PTR_ERR(grf);
}
---
base-commit: 350adaf7fde9fdbd9aeed6d442a9ae90c6a3ab97
change-id: 20260217-grf-fc76046fe5e3
Best regards,
--
Felix Gu <ustc.gu@gmail.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] soc: rockchip: grf: Fix device node reference leak in rockchip_grf_init()
2026-02-16 20:11 [PATCH] soc: rockchip: grf: Fix device node reference leak in rockchip_grf_init() Felix Gu
@ 2026-02-21 15:28 ` Heiko Stübner
0 siblings, 0 replies; 2+ messages in thread
From: Heiko Stübner @ 2026-02-21 15:28 UTC (permalink / raw)
To: Shawn Lin, Felix Gu
Cc: linux-arm-kernel, linux-rockchip, linux-kernel, Felix Gu
Hi Felix,
Am Montag, 16. Februar 2026, 21:11:32 Mitteleuropäische Normalzeit schrieb Felix Gu:
> In rockchip_grf_init(), when syscon_node_to_regmap fails, it returns
> without calling of_node_put(), which causes a reference leak.
>
> Add the missing of_node_put() call to fix it.
>
> Fixes: 75fb63ae0312 ("soc: rockchip: grf: Support multiple grf to be handled")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Shawn was a bit earlier with a similar fix [0], so their patch will go in.
Heiko
[0] https://lore.kernel.org/all/1770814957-17762-1-git-send-email-shawn.lin@rock-chips.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-21 15:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-16 20:11 [PATCH] soc: rockchip: grf: Fix device node reference leak in rockchip_grf_init() Felix Gu
2026-02-21 15:28 ` Heiko Stübner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox