Home
last modified time | relevance | path

Searched hist:"49 ed86f503be80aac158a567c4cfd31cf1cd181e" (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/soc/amlogic/
H A Dmeson-gx-socinfo.cdiff 49ed86f503be80aac158a567c4cfd31cf1cd181e Mon Aug 19 09:27:06 CEST 2019 Nishka Dasgupta <nishkadg.linux@gmail.com> 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: a9daaba2965e ("soc: Add Amlogic SoC Information driver")
Signed-off-by: Kevin Hilman <khilman@baylibre.com>