meson-mx-socinfo: Fix refcount leak in meson_mx_socinfo_init
authorMiaoqian Lin <linmq006@gmail.com>
Tue, 24 May 2022 06:57:29 +0000 (10:57 +0400)
committerNeil Armstrong <narmstrong@baylibre.com>
Wed, 25 May 2022 07:19:01 +0000 (09:19 +0200)
commita2106f38077e78afcb4bf98fdda3e162118cfb3d
treebddbefda145058b95ab3ec8774ca5e39846aa5b8
parentf2b03c1056ef5c0829678f51273eace3e6327884
meson-mx-socinfo: Fix refcount leak in meson_mx_socinfo_init

of_find_matching_node() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Add missing of_node_put() to avoid refcount leak.

Fixes: 5e68c0fc8df8 ("soc: amlogic: Add Meson6/Meson8/Meson8b/Meson8m2 SoC Information driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20220524065729.33689-1-linmq006@gmail.com
drivers/soc/amlogic/meson-mx-socinfo.c