linux/drivers/soc/amlogic
Nishka Dasgupta 49ed86f503 soc: amlogic: meson-gx-socinfo: Add of_node_put() before return
The variable np in function meson_gx_socinfo_init takes the return value
of of_find_compatible_node, which gets a node but does not put it. If
this node is not put it may cause a memory leak. Hence put np after its
usefulness has been exhausted.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Fixes: a9daaba296 ("soc: Add Amlogic SoC Information driver")
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-08-20 14:53:33 -07:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
meson-canvas.c soc: amlogic: canvas: add support for Meson8, Meson8b and Meson8m2 2019-05-22 18:19:14 -07:00
meson-clk-measure.c soc: amlogic: clk-measure: Add support for SM1 2019-08-20 12:21:13 -07:00
meson-gx-pwrc-vpu.c soc: amlogic: meson-gx-pwrc-vpu: Add support for G12A 2019-04-16 11:09:53 -07:00
meson-gx-socinfo.c soc: amlogic: meson-gx-socinfo: Add of_node_put() before return 2019-08-20 14:53:33 -07:00
meson-mx-socinfo.c meson-mx-socinfo: Make local function meson_mx_socinfo_init() static 2018-02-12 14:15:47 -08:00