提交 6a6dafda 编写于 作者: J Jeffy Chen 提交者: Mark Brown

ASoC: Add a sanity check before using dai driver name

The dai driver's name is allowed to be NULL. So add a sanity check for
that.
Signed-off-by: NJeffy Chen <jeffy.chen@rock-chips.com>
Reported-by: NDonglin Peng <dolinux.peng@gmail.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 4958471b
......@@ -1029,7 +1029,8 @@ struct snd_soc_dai *snd_soc_find_dai(
continue;
list_for_each_entry(dai, &component->dai_list, list) {
if (dlc->dai_name && strcmp(dai->name, dlc->dai_name)
&& strcmp(dai->driver->name, dlc->dai_name))
&& (!dai->driver->name
|| strcmp(dai->driver->name, dlc->dai_name)))
continue;
return dai;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册