diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2020-02-13 11:35:33 +0300 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2020-02-18 12:46:08 +0300 |
commit | 4a4fb66119eb7135e6ce9cf61488c86f9888bb15 (patch) | |
tree | 4316ba67f1cf3204c410959fc60b82943442609f /arch/arm/mach-imx/anatop.c | |
parent | cc56f77e526dd1b7b29b4529367747fc4c789c66 (diff) | |
download | linux-4a4fb66119eb7135e6ce9cf61488c86f9888bb15.tar.xz |
ARM: imx: Add missing of_node_put()
After finishing using device node got from of_find_compatible_node(),
of_node_put() needs to be called.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'arch/arm/mach-imx/anatop.c')
-rw-r--r-- | arch/arm/mach-imx/anatop.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/anatop.c b/arch/arm/mach-imx/anatop.c index 8fb68c0ec34c..ea4a59648932 100644 --- a/arch/arm/mach-imx/anatop.c +++ b/arch/arm/mach-imx/anatop.c @@ -94,7 +94,7 @@ void imx_anatop_post_resume(void) void __init imx_init_revision_from_anatop(void) { - struct device_node *np; + struct device_node *np, *src_np; void __iomem *anatop_base; unsigned int revision; u32 digprog; @@ -135,9 +135,10 @@ void __init imx_init_revision_from_anatop(void) void __iomem *src_base; u32 sbmr2; - np = of_find_compatible_node(NULL, NULL, + src_np = of_find_compatible_node(NULL, NULL, "fsl,imx6ul-src"); src_base = of_iomap(np, 0); + of_node_put(src_np); WARN_ON(!src_base); sbmr2 = readl_relaxed(src_base + SRC_SBMR2); iounmap(src_base); @@ -149,6 +150,7 @@ void __init imx_init_revision_from_anatop(void) } } } + of_node_put(np); mxc_set_cpu_type(digprog >> 16 & 0xff); imx_set_soc_revision(revision); |