pinctrl: mediatek: Fix missing of_node_put() in mtk_pctrl_init
authorMiaoqian Lin <linmq006@gmail.com>
Tue, 8 Mar 2022 07:11:54 +0000 (07:11 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2022 07:06:37 +0000 (09:06 +0200)
commitd5317cf1338003d4894196af93a518204e502d10
tree4f8e77e2c2e8345581bb815d9042a0d1118485ce
parente893ca9a5d1738a36d3a54c05d283fecd91fcd65
pinctrl: mediatek: Fix missing of_node_put() in mtk_pctrl_init

[ Upstream commit dab4df9ca919f59e5b9dd84385eaf34d4f20dbb0 ]

The device_node pointer is returned by of_parse_phandle()  with refcount
incremented. We should use of_node_put() on it when done.

Fixes: a6df410d420a ("pinctrl: mediatek: Add Pinctrl/GPIO driver for mt8135.")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220308071155.21114-1-linmq006@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pinctrl/mediatek/pinctrl-mtk-common.c