未验证 提交 43ca5dab 编写于 作者: K Kuninori Morimoto 提交者: Mark Brown

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

commit 52abe6cc ("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: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87tvaczazd.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 6b8ac43c
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册