2020-02-12 12:04:16

by Anson Huang

[permalink] [raw]
Subject: [PATCH 4/5] clk: imx8mn: Add missing of_node_put()

After finishing using device node got from of_find_compatible_node(),
of_node_put() needs to be called.

Signed-off-by: Anson Huang <[email protected]>
---
drivers/clk/imx/clk-imx8mn.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c
index ad20487..9130203 100644
--- a/drivers/clk/imx/clk-imx8mn.c
+++ b/drivers/clk/imx/clk-imx8mn.c
@@ -317,6 +317,7 @@ static int imx8mn_clocks_probe(struct platform_device *pdev)

np = of_find_compatible_node(NULL, NULL, "fsl,imx8mn-anatop");
base = of_iomap(np, 0);
+ of_node_put(np);
if (WARN_ON(!base)) {
ret = -ENOMEM;
goto unregister_hws;
--
2.7.4


2020-02-12 20:57:54

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH 4/5] clk: imx8mn: Add missing of_node_put()

Quoting Anson Huang (2020-02-12 03:57:36)
> After finishing using device node got from of_find_compatible_node(),
> of_node_put() needs to be called.
>
> Signed-off-by: Anson Huang <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>