summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2018-12-26 08:55:10 -0500
committerBen Hutchings <ben@decadent.org.uk>2019-07-09 22:03:41 +0100
commitbf8436856123c35b061bd735630cbbf07d506cbb (patch)
treea14e908805024ecb3ec932d730c7365dd844e939
parent9fd5179660b6737ed239751286270fafbbce724e (diff)
clk: imx6sx: fix refcount leak in imx6sx_clocks_init()
commit 1731e14fb30212dd8c1e9f8fc1af061e56498c55 upstream. The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Fixes: d55135689019 ("ARM: imx: add clock driver for imx6sx") Signed-off-by: Stephen Boyd <sboyd@kernel.org> [bwh: Backported to 3.16: adjust filename] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--arch/arm/mach-imx/clk-imx6sx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/clk-imx6sx.c b/arch/arm/mach-imx/clk-imx6sx.c
index ac8ea72f28ab..fe45c1917ce8 100644
--- a/arch/arm/mach-imx/clk-imx6sx.c
+++ b/arch/arm/mach-imx/clk-imx6sx.c
@@ -143,6 +143,7 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node)
np = of_find_compatible_node(NULL, NULL, "fsl,imx6sx-anatop");
base = of_iomap(np, 0);
WARN_ON(!base);
+ of_node_put(np);
/* type name parent_name base div_mask */
clks[IMX6SX_CLK_PLL1_SYS] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1_sys", "osc", base, 0x7f);