summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2018-12-26 08:53:00 -0500
committerBen Hutchings <ben@decadent.org.uk>2019-07-09 22:03:40 +0100
commit9fd5179660b6737ed239751286270fafbbce724e (patch)
treebc57a2d7864ebee1256ffa8baa1bd968424185cb
parent273910b1603ce0acc9e727ba01596b194d68d34e (diff)
downloadlinux-stable-9fd5179660b6737ed239751286270fafbbce724e.tar.gz
linux-stable-9fd5179660b6737ed239751286270fafbbce724e.tar.bz2
linux-stable-9fd5179660b6737ed239751286270fafbbce724e.zip
clk: imx6q: fix refcount leak in imx6q_clocks_init()
commit c9ec1d8fef31b5fc9e90e99f9bd685db5caa7c5e 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: 2acd1b6f889c ("ARM: i.MX6: implement clocks using common clock framework") 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-imx6q.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index 032d1b958889..213351ac5e38 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -157,6 +157,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop");
base = of_iomap(np, 0);
WARN_ON(!base);
+ of_node_put(np);
/* Audio/video PLL post dividers do not work on i.MX6q revision 1.0 */
if (cpu_is_imx6q() && imx_get_soc_revision() == IMX_CHIP_REVISION_1_0) {