OSDN Git Service

ASoC: qcom: Fix of-node refcount unbalance in apq8016_sbc_parse_of()
authorTakashi Iwai <tiwai@suse.de>
Tue, 19 Feb 2019 15:46:50 +0000 (16:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:26 +0000 (14:50 +0100)
commit17c1ffd206d07f70d0ed350faa2fe531b162bc0a
treec442d97fdbd7bec71208c223ae94a30ef203597e
parent4fe1e6caac16b7bd20eacc1c363351e5d533ac35
ASoC: qcom: Fix of-node refcount unbalance in apq8016_sbc_parse_of()

[ Upstream commit 8d1667200850f8753c0265fa4bd25c9a6e5f94ce ]

The apq8016 driver leaves the of-node refcount at aborting from the
loop of for_each_child_of_node() in the error path.  Not only the
iterator node of for_each_child_of_node(), the children nodes referred
from it for codec and cpu have to be properly unreferenced.

Fixes: bdb052e81f62 ("ASoC: qcom: add apq8016 sound card support")
Cc: Patrick Lai <plai@codeaurora.org>
Cc: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/qcom/apq8016_sbc.c