summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-08-20 07:05:32 +0200
committerMark Brown <broonie@kernel.org>2019-08-22 19:31:38 +0200
commit43ca5dab978294eae26a36f8989b6f0769da4256 (patch)
treec3cf55d4e1955b9bb09efc4a3ddbc2aacc946412 /sound
parentASoC: soc-dai: use bit field for bus_control (diff)
downloadlinux-43ca5dab978294eae26a36f8989b6f0769da4256.tar.xz
linux-43ca5dab978294eae26a36f8989b6f0769da4256.zip
ASoC: soc-topology: use for_each_component_dais() at remove_dai()
commit 52abe6cc1866a ("ASoC: topology: fix oops/use-after-free case with dai driver") fixups remove_dai() error, but it is using list_for_each_entry() for component->dai_list. We already have for_each_component_dais() macro for it. Let's use exising method. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87tvaczazd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-topology.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index dc463f1a9e24..b8690715abb5 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -530,7 +530,7 @@ static void remove_dai(struct snd_soc_component *comp,
if (dobj->ops && dobj->ops->dai_unload)
dobj->ops->dai_unload(comp, dobj);
- list_for_each_entry(dai, &comp->dai_list, list)
+ for_each_component_dais(comp, dai)
if (dai->driver == dai_drv)
dai->driver = NULL;