Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: Skylake: Fix to fail safely if module not available in path
@ 2016-12-20  7:16 Subhransu S. Prusty
  2016-12-31 19:19 ` Applied "ASoC: Intel: Skylake: Fix to fail safely if module not available in path" to the asoc tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Subhransu S. Prusty @ 2016-12-20  7:16 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, lgirdwood, G Kranthi, patches.audio, broonie, vinod.koul,
	Subhransu S. Prusty

From: G Kranthi <gudishax.kranthikumar@intel.com>

If a module is not available in a pipeline, fail safely rather than
causing oops.

Signed-off-by: G Kranthi <gudishax.kranthikumar@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
---
 sound/soc/intel/skylake/skl-pcm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index 10fa10d..7e97ae6 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -254,6 +254,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;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-31 19:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-20  7:16 [PATCH] ASoC: Intel: Skylake: Fix to fail safely if module not available in path Subhransu S. Prusty
2016-12-31 19:19 ` Applied "ASoC: Intel: Skylake: Fix to fail safely if module not available in path" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox