]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
clk: vf610: fix refcount leak in vf610_clocks_init()
authorYangtao Li <tiny.windzz@gmail.com>
Wed, 26 Dec 2018 13:59:36 +0000 (08:59 -0500)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit 567177024e0313e4f0dcba7ba10c0732e50e655d ]

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: 1f2c5fd5f048 ("ARM: imx: add VF610 clock support")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/clk/imx/clk-vf610.c

index 6dae54325a91ddb32bb733b9d7d5cf48d0ecc023..a334667c450a1edf446e301e6be13b375a64053d 100644 (file)
@@ -203,6 +203,7 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)
        np = of_find_compatible_node(NULL, NULL, "fsl,vf610-anatop");
        anatop_base = of_iomap(np, 0);
        BUG_ON(!anatop_base);
+       of_node_put(np);
 
        np = ccm_node;
        ccm_base = of_iomap(np, 0);