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)
committerMark Brown <broonie@kernel.org>
Wed, 20 Feb 2019 16:43:29 +0000 (16:43 +0000)
commit8d1667200850f8753c0265fa4bd25c9a6e5f94ce
tree38c0d81cc6d0ece603f2f8006026c30a08bd6d7a
parentd832d2b246c516eacb2d0ba53ec17ed59c3cd62b
ASoC: qcom: Fix of-node refcount unbalance in apq8016_sbc_parse_of()

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>
sound/soc/qcom/apq8016_sbc.c