提交 91ce5497 编写于 作者: G G Kranthi 提交者: Mark Brown

ASoC: Intel: Skylake: Fix to fail safely if module not available in path

If a module is not available in a pipeline, fail safely rather than
causing oops.
Signed-off-by: NG Kranthi <gudishax.kranthikumar@intel.com>
Signed-off-by: NSubhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 4a8b3a68
......@@ -180,6 +180,9 @@ static int skl_pcm_open(struct snd_pcm_substream *substream,
snd_pcm_set_sync(substream);
mconfig = skl_tplg_fe_get_cpr_module(dai, substream->stream);
if (!mconfig)
return -EINVAL;
skl_tplg_d0i3_get(skl, mconfig->d0i3_caps);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册