]> 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>
Thu, 25 Aug 2022 09:18:00 +0000 (11:18 +0200)
commit88390931841cb80e8c2c1c2f77ef4379bc98e700
treee95faf0c2eec46bfcc8dcc5100dd8da1e8e4ab9d
parent9ba6b69a250ed75d8d32be61dd5f7abb9ac738b6
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