imx.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] firmware: imx-scu: fix OF node leak in .probe()
@ 2024-12-24  3:34 Joe Hattori
  2025-02-18  3:23 ` Shawn Guo
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Hattori @ 2024-12-24  3:34 UTC (permalink / raw)
  To: shawnguo, s.hauer, kernel, festevam; +Cc: imx, Joe Hattori

imx_scu_probe() calls of_parse_phandle_with_args(), but does not
release the OF node reference obtained by it. Add a of_node_put() call
after done with the node.

Fixes: f25a066d1a07 ("firmware: imx-scu: Support one TX and one RX")
Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
---
 drivers/firmware/imx/imx-scu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/firmware/imx/imx-scu.c b/drivers/firmware/imx/imx-scu.c
index 1dd4362ef9a3..8c28e25ddc8a 100644
--- a/drivers/firmware/imx/imx-scu.c
+++ b/drivers/firmware/imx/imx-scu.c
@@ -280,6 +280,7 @@ static int imx_scu_probe(struct platform_device *pdev)
 		return ret;
 
 	sc_ipc->fast_ipc = of_device_is_compatible(args.np, "fsl,imx8-mu-scu");
+	of_node_put(args.np);
 
 	num_channel = sc_ipc->fast_ipc ? 2 : SCU_MU_CHAN_NUM;
 	for (i = 0; i < num_channel; i++) {
-- 
2.34.1


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

* Re: [PATCH] firmware: imx-scu: fix OF node leak in .probe()
  2024-12-24  3:34 [PATCH] firmware: imx-scu: fix OF node leak in .probe() Joe Hattori
@ 2025-02-18  3:23 ` Shawn Guo
  0 siblings, 0 replies; 2+ messages in thread
From: Shawn Guo @ 2025-02-18  3:23 UTC (permalink / raw)
  To: Joe Hattori; +Cc: shawnguo, s.hauer, kernel, festevam, imx

On Tue, Dec 24, 2024 at 12:34:56PM +0900, Joe Hattori wrote:
> imx_scu_probe() calls of_parse_phandle_with_args(), but does not
> release the OF node reference obtained by it. Add a of_node_put() call
> after done with the node.
> 
> Fixes: f25a066d1a07 ("firmware: imx-scu: Support one TX and one RX")
> Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>

Applied, thanks!


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

end of thread, other threads:[~2025-02-18  3:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-24  3:34 [PATCH] firmware: imx-scu: fix OF node leak in .probe() Joe Hattori
2025-02-18  3:23 ` Shawn Guo

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).