ASoC: soc-topology: use for_each_component_dais() at remove_dai()

commit 52abe6cc18 ("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>
This commit is contained in:
Kuninori Morimoto 2019-08-20 14:05:32 +09:00 committed by Mark Brown
parent 6b8ac43c33
commit 43ca5dab97
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 1 deletions

View File

@ -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;