linux/sound/soc/generic
Takashi Iwai 0b9c9ed6dd
ASoC: simple-card: Fix of-node refcount unbalance in DAI-link parser
The function simple_for_each_link() has a few missing places that
forgot unrefereing of-nodes after the use.  The main do-while loop
may abort when loop=0, and this leaves the node object still
referenced.  A similar leak is found in the error handling of NULL
codec that aborts the loop as well.  Last but not least, the inner
for_each_child_of_node() loop may abort in the middle, and this leaks
the refcount of the iterator node.

This patch addresses these missing refcount issues.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-20 12:12:37 +00:00
..
audio-graph-card.c ASoC: simple-card: rename to asoc_simple_card_canonicalize_platform() 2019-01-21 18:14:16 +00:00
Kconfig ASoC: simple-scu-card: remove simple-scu-card 2019-01-03 16:34:19 +00:00
Makefile ASoC: simple-scu-card: remove simple-scu-card 2019-01-03 16:34:19 +00:00
simple-card-utils.c ASoC: simple-card: rename to asoc_simple_card_canonicalize_platform() 2019-01-21 18:14:16 +00:00
simple-card.c ASoC: simple-card: Fix of-node refcount unbalance in DAI-link parser 2019-02-20 12:12:37 +00:00