未验证 提交 6ae4902f 编写于 作者: P Pierre-Louis Bossart 提交者: Mark Brown
上级 0fae253a
...@@ -1851,7 +1851,7 @@ static int soc_tplg_dai_create(struct soc_tplg *tplg, ...@@ -1851,7 +1851,7 @@ static int soc_tplg_dai_create(struct soc_tplg *tplg,
list_add(&dai_drv->dobj.list, &tplg->comp->dobj_list); list_add(&dai_drv->dobj.list, &tplg->comp->dobj_list);
/* register the DAI to the component */ /* register the DAI to the component */
dai = snd_soc_register_dai(tplg->comp, dai_drv, false); dai = devm_snd_soc_register_dai(tplg->comp->dev, tplg->comp, dai_drv, false);
if (!dai) if (!dai)
return -ENOMEM; return -ENOMEM;
...@@ -1859,7 +1859,6 @@ static int soc_tplg_dai_create(struct soc_tplg *tplg, ...@@ -1859,7 +1859,6 @@ static int soc_tplg_dai_create(struct soc_tplg *tplg,
ret = snd_soc_dapm_new_dai_widgets(dapm, dai); ret = snd_soc_dapm_new_dai_widgets(dapm, dai);
if (ret != 0) { if (ret != 0) {
dev_err(dai->dev, "Failed to create DAI widgets %d\n", ret); dev_err(dai->dev, "Failed to create DAI widgets %d\n", ret);
snd_soc_unregister_dai(dai);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册