arm: mach-imx: Add mising of_node_put in cpu-imx25.c
Subsystems (3)
PATCH 1/1 arm: mach-imx: Add mising of_node_put in cpu-imx25.c
In mx25_read_cpu_rev(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore.
Signed-off-by Liang He <[email protected]>
--- arch/arm/mach-imx/cpu-imx25.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-imx/cpu-imx25.c +3 -0
@@ -23,6 +23,9 @@ static int mx25_read_cpu_rev(void) np =of_find_compatible_node (NULL ,NULL ,"fsl,imx25-iim" ); iim_base =of_iomap (np,0 ); + +of_node_put (np); +BUG_ON (!iim_base); rev =readl (iim_base +MXC_IIMSREV );iounmap (iim_base);
Signature · 1 line
2.25.1