Skip to content

Commit

Permalink
clk: imx6sll: 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: 4a5f720 ("clk: imx: add clock driver for imx6sll")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
  • Loading branch information
Nicholas Mc Guire authored and Stephen Boyd committed Jul 25, 2018
1 parent 11177e7 commit 7f5eac5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/clk/imx/clk-imx6sll.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ static void __init imx6sll_clocks_init(struct device_node *ccm_node)

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

/* Do not bypass PLLs initially */
Expand Down

0 comments on commit 7f5eac5

Please sign in to comment.