diff options
author | Dario Binacchi <dario.binacchi@amarulasolutions.com> | 2022-12-08 17:54:03 +0100 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2022-12-31 14:13:40 +0100 |
commit | 87b30c4b0efb6a194a7b8eac2568a3da520d905f (patch) | |
tree | 6d9f932aac0a62d3c2fccffbbc8397f4aa801b02 /arch/arm/mach-imx/cpu-imx35.c | |
parent | arm64: dts: imx93-11x11-evk: correct clock and strobe pad setting (diff) | |
download | linux-87b30c4b0efb6a194a7b8eac2568a3da520d905f.tar.xz linux-87b30c4b0efb6a194a7b8eac2568a3da520d905f.zip |
ARM: imx: add missing of_node_put()
Calling of_find_compatible_node() returns a node pointer with refcount
incremented. Use of_node_put() on it when done.
The patch fixes the same problem on different i.MX platforms.
Fixes: 8b88f7ef31dde ("ARM: mx25: Retrieve IIM base from dt")
Fixes: 94b2bec1b0e05 ("ARM: imx27: Retrieve the SYSCTRL base address from devicetree")
Fixes: 3172225d45bd9 ("ARM: imx31: Retrieve the IIM base address from devicetree")
Fixes: f68ea682d1da7 ("ARM: imx35: Retrieve the IIM base address from devicetree")
Fixes: ee18a7154ee08 ("ARM: imx5: retrieve iim base from device tree")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'arch/arm/mach-imx/cpu-imx35.c')
-rw-r--r-- | arch/arm/mach-imx/cpu-imx35.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/cpu-imx35.c b/arch/arm/mach-imx/cpu-imx35.c index 80e7d8ab9f1b..1fe75b39c2d9 100644 --- a/arch/arm/mach-imx/cpu-imx35.c +++ b/arch/arm/mach-imx/cpu-imx35.c @@ -21,6 +21,7 @@ static int mx35_read_cpu_rev(void) np = of_find_compatible_node(NULL, NULL, "fsl,imx35-iim"); iim_base = of_iomap(np, 0); + of_node_put(np); BUG_ON(!iim_base); rev = imx_readl(iim_base + MXC_IIMSREV); |