Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91ce5497 authored by G Kranthi's avatar G Kranthi Committed by Mark Brown
Browse files

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: default avatarG Kranthi <gudishax.kranthikumar@intel.com>
Signed-off-by: default avatarSubhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4a8b3a68
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;