ASoC: mediatek: Fix missing of_node_put in mt2701_wm8960_machine_probe
authorMiaoqian Lin <linmq006@gmail.com>
Mon, 4 Apr 2022 09:35:25 +0000 (09:35 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:45 +0000 (10:22 +0200)
commit61a85a20e8df5e0a92cfe169c92425c7bae0753b
tree6852d6ce98e1762f9ccd4a93f1281c1e7391270e
parent48889eb3cce91d7f58e02bc07277b7f724b7a54a
ASoC: mediatek: Fix missing of_node_put in mt2701_wm8960_machine_probe

[ Upstream commit 05654431a18fe24e5e46a375d98904134628a102 ]

This node pointer is returned by of_parse_phandle() with
refcount incremented in this function.
Calling of_node_put() to avoid the refcount leak.

Fixes: 8625c1dbd876 ("ASoC: mediatek: Add mt2701-wm8960 machine driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220404093526.30004-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/mediatek/mt2701/mt2701-wm8960.c