pinctrl: pinconf-generic: add missing of_node_put()
authorZhangPeng <zhangpeng362@huawei.com>
Fri, 25 Nov 2022 07:01:56 +0000 (07:01 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:16 +0000 (13:32 +0100)
commit5e2fa5132995de2641fc1ac2a5aec9740b0377c1
tree1e6632e67ae207eabf13037a93ab74c610d41505
parentd998e985232a46a7860d7bffe196a9c3f3a87920
pinctrl: pinconf-generic: add missing of_node_put()

[ Upstream commit 5ead93289815a075d43c415e35c8beafafb801c9 ]

of_node_put() needs to be called when jumping out of the loop, since
for_each_available_child_of_node() will increase the refcount of node.

Fixes: c7289500e29d ("pinctrl: pinconf-generic: scan also referenced phandle node")
Signed-off-by: ZhangPeng <zhangpeng362@huawei.com>
Link: https://lore.kernel.org/r/20221125070156.3535855-1-zhangpeng362@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pinctrl/pinconf-generic.c