* [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
* Applied "ASoC: Intel: Skylake: Fix to fail safely if module not available in path" to the asoc tree
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 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2016-12-31 19:19 UTC (permalink / raw)
To: G Kranthi
Cc: alsa-devel, tiwai, lgirdwood, patches.audio, broonie, vinod.koul,
Subhransu S. Prusty
The patch
ASoC: Intel: Skylake: Fix to fail safely if module not available in path
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 91ce54978ccece323aa6df930249ff84a7d233c7 Mon Sep 17 00:00:00 2001
From: G Kranthi <gudishax.kranthikumar@intel.com>
Date: Tue, 20 Dec 2016 12:46:45 +0530
Subject: [PATCH] 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>
---
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 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;
--
2.11.0
^ 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