diff options
author | G Kranthi <gudishax.kranthikumar@intel.com> | 2016-12-20 08:16:45 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-12-31 19:55:00 +0100 |
commit | 91ce54978ccece323aa6df930249ff84a7d233c7 (patch) | |
tree | 474bd502bfc0e7998efc1e38d2eb6bf497eceab4 /sound | |
parent | ASoC: Intel: bytcr_rt5640: fallback mechanism if MCLK is not enabled (diff) | |
download | linux-91ce54978ccece323aa6df930249ff84a7d233c7.tar.xz linux-91ce54978ccece323aa6df930249ff84a7d233c7.zip |
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: G Kranthi <gudishax.kranthikumar@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/intel/skylake/skl-pcm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c index 84b5101e6ca6..6c6b63a6b338 100644 --- a/sound/soc/intel/skylake/skl-pcm.c +++ b/sound/soc/intel/skylake/skl-pcm.c @@ -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; |