diff mbox series

[2/5] clk: imx8mq: Add missing of_node_put()

Message ID 1581508657-12107-2-git-send-email-Anson.Huang@nxp.com (mailing list archive)
State Mainlined
Commit cb5ae504f2014a66c131920b8eb0ca6b0e6851c6
Headers show
Series [1/5] clk: imx6sl: Add missing of_node_put() | expand

Commit Message

Anson Huang Feb. 12, 2020, 11:57 a.m. UTC
After finishing using device node got from of_find_compatible_node(),
of_node_put() needs to be called.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/clk/imx/clk-imx8mq.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Stephen Boyd Feb. 12, 2020, 8:56 p.m. UTC | #1
Quoting Anson Huang (2020-02-12 03:57:34)
> After finishing using device node got from of_find_compatible_node(),
> of_node_put() needs to be called.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---

Reviewed-by: Stephen Boyd <sboyd@kernel.org>
diff mbox series

Patch

diff --git a/drivers/clk/imx/clk-imx8mq.c b/drivers/clk/imx/clk-imx8mq.c
index 8c82e7a..831ce71 100644
--- a/drivers/clk/imx/clk-imx8mq.c
+++ b/drivers/clk/imx/clk-imx8mq.c
@@ -305,6 +305,7 @@  static int imx8mq_clocks_probe(struct platform_device *pdev)
 
 	np = of_find_compatible_node(NULL, NULL, "fsl,imx8mq-anatop");
 	base = of_iomap(np, 0);
+	of_node_put(np);
 	if (WARN_ON(!base))
 		return -ENOMEM;