arm: mach-imx: Add missing of_node_put in cpu-imx27.c
Subsystems (3)
PATCH 1/1 arm: mach-imx: Add missing of_node_put in cpu-imx27.c
In mx27_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-imx27.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-imx/cpu-imx27.c +3 -0
@@ -28,6 +28,9 @@ static int mx27_read_cpu_rev(void) np =of_find_compatible_node (NULL ,NULL ,"fsl,imx27-ccm" ); ccm_base =of_iomap (np,0 ); + +of_node_put (np); +BUG_ON (!ccm_base);/* * now we have access to the IO registers. As we need
Signature · 7 lines
2.25.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel