]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: mediatek: mt8173: Fix refcount leak in mt8173_rt5650_rt5676_dev_probe
authorMiaoqian Lin <linmq006@gmail.com>
Thu, 2 Jun 2022 03:41:42 +0000 (07:41 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:02 +0000 (14:24 +0200)
commit880df9e8b438de99c8b4696be991f778d3089c71
tree335d990d85ebf2ecbaaa5f37ff900367bf107e8b
parent08d52009f3f822a2736456fac06e0345d09be442
ASoC: mediatek: mt8173: Fix refcount leak in mt8173_rt5650_rt5676_dev_probe

[ Upstream commit 40eea15f426277b4a3c2118cdee8436f4b8aaba1 ]

of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Fix missing of_node_put() in error paths.

Fixes: 5f86aa2ef9aa ("ASoC: mediatek: Use platform_of_node for machine drivers")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220602034144.60159-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c