Skip to content

Commit

Permalink
clk: imx6ul: fix missing of_node_put()
Browse files Browse the repository at this point in the history
of_find_compatible_node() is returning a device node with refcount
incremented and must be explicitly decremented after the last use
which is right after the us in of_iomap() here.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Fixes: 787b427 ("clk: imx: add imx6ul clk tree support")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
  • Loading branch information
Nicholas Mc Guire authored and Stephen Boyd committed Jul 25, 2018
1 parent ce397d2 commit 11177e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/clk/imx/clk-imx6ul.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ static void __init imx6ul_clocks_init(struct device_node *ccm_node)

np = of_find_compatible_node(NULL, NULL, "fsl,imx6ul-anatop");
base = of_iomap(np, 0);
of_node_put(np);
WARN_ON(!base);

clks[IMX6UL_PLL1_BYPASS_SRC] = imx_clk_mux("pll1_bypass_src", base + 0x00, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels));
Expand Down

0 comments on commit 11177e7

Please sign in to comment.