]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: mediatek: mt8195: Fix error handling in mt8195_mt6359_rt1019_rt5682_dev_probe
authorMiaoqian Lin <linmq006@gmail.com>
Wed, 16 Mar 2022 08:46:15 +0000 (08:46 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 16 Mar 2022 16:39:25 +0000 (16:39 +0000)
commit0f423ae1dc3e2af26ebfd434278293a07fcb2f1f
tree196aa95a421276b3b507da5524af8b12d63b3a07
parentf93969ff36119ad5a6c62491971f1b6fb43a61d1
ASoC: mediatek: mt8195: Fix error handling in mt8195_mt6359_rt1019_rt5682_dev_probe

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

This function only calls of_node_put() in the regular path.
And it will cause refcount leak in error path.

Fixes: 19a9383db2bd ("ASoC: mediatek: mt8195: release device_node after snd_soc_register_card")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220316084623.24238-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c