* [PATCH 2/4] ASoC: wm8904: Check for clk_prepare_enable() error
2015-06-20 18:55 [PATCH 1/4] ASoC: max98090: Check for clk_prepare_enable() error Fabio Estevam
@ 2015-06-20 18:55 ` Fabio Estevam
2015-06-20 18:55 ` [PATCH 3/4] ASoC: wm8731: " Fabio Estevam
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2015-06-20 18:55 UTC (permalink / raw)
To: broonie; +Cc: Fabio Estevam, alsa-devel
From: Fabio Estevam <fabio.estevam@freescale.com>
clk_prepare_enable() may fail, so we should better check its return value
and propagate it in the case of error.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
sound/soc/codecs/wm8904.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
index 265a4a5..07dc400 100644
--- a/sound/soc/codecs/wm8904.c
+++ b/sound/soc/codecs/wm8904.c
@@ -1837,7 +1837,9 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec,
switch (level) {
case SND_SOC_BIAS_ON:
- clk_prepare_enable(wm8904->mclk);
+ ret = clk_prepare_enable(wm8904->mclk);
+ if (ret)
+ return ret;
break;
case SND_SOC_BIAS_PREPARE:
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 3/4] ASoC: wm8731: Check for clk_prepare_enable() error
2015-06-20 18:55 [PATCH 1/4] ASoC: max98090: Check for clk_prepare_enable() error Fabio Estevam
2015-06-20 18:55 ` [PATCH 2/4] ASoC: wm8904: " Fabio Estevam
@ 2015-06-20 18:55 ` Fabio Estevam
2015-06-20 18:55 ` [PATCH 4/4] ASoC: max98095: " Fabio Estevam
2015-07-07 18:30 ` Applied "ASoC: max98090: Check for clk_prepare_enable() error" to the asoc tree Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2015-06-20 18:55 UTC (permalink / raw)
To: broonie; +Cc: Fabio Estevam, alsa-devel
From: Fabio Estevam <fabio.estevam@freescale.com>
clk_prepare_enable() may fail, so we should better check its return value
and propagate it in the case of error.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
sound/soc/codecs/wm8731.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 915ea11..3f87e7d 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -496,8 +496,11 @@ static int wm8731_set_bias_level(struct snd_soc_codec *codec,
switch (level) {
case SND_SOC_BIAS_ON:
- if (wm8731->mclk)
- clk_prepare_enable(wm8731->mclk);
+ if (wm8731->mclk) {
+ ret = clk_prepare_enable(wm8731->mclk);
+ if (ret)
+ return ret;
+ }
break;
case SND_SOC_BIAS_PREPARE:
break;
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 4/4] ASoC: max98095: Check for clk_prepare_enable() error
2015-06-20 18:55 [PATCH 1/4] ASoC: max98090: Check for clk_prepare_enable() error Fabio Estevam
2015-06-20 18:55 ` [PATCH 2/4] ASoC: wm8904: " Fabio Estevam
2015-06-20 18:55 ` [PATCH 3/4] ASoC: wm8731: " Fabio Estevam
@ 2015-06-20 18:55 ` Fabio Estevam
2015-07-07 18:30 ` Applied "ASoC: max98090: Check for clk_prepare_enable() error" to the asoc tree Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2015-06-20 18:55 UTC (permalink / raw)
To: broonie; +Cc: Fabio Estevam, alsa-devel
From: Fabio Estevam <fabio.estevam@freescale.com>
clk_prepare_enable() may fail, so we should better check its return value
and propagate it in the case of error.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
sound/soc/codecs/max98095.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index 9a46d3d..66afd2b 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -1653,10 +1653,13 @@ static int max98095_set_bias_level(struct snd_soc_codec *codec,
if (IS_ERR(max98095->mclk))
break;
- if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_ON)
+ if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_ON) {
clk_disable_unprepare(max98095->mclk);
- else
- clk_prepare_enable(max98095->mclk);
+ } else {
+ ret = clk_prepare_enable(max98095->mclk);
+ if (ret)
+ return ret;
+ }
break;
case SND_SOC_BIAS_STANDBY:
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Applied "ASoC: max98090: Check for clk_prepare_enable() error" to the asoc tree
2015-06-20 18:55 [PATCH 1/4] ASoC: max98090: Check for clk_prepare_enable() error Fabio Estevam
` (2 preceding siblings ...)
2015-06-20 18:55 ` [PATCH 4/4] ASoC: max98095: " Fabio Estevam
@ 2015-07-07 18:30 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2015-07-07 18:30 UTC (permalink / raw)
To: Fabio Estevam, Mark Brown; +Cc: alsa-devel
The patch
ASoC: max98090: Check for clk_prepare_enable() error
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 9acc7f08716b98730e1ead7e785fb0f3ad3a2d07 Mon Sep 17 00:00:00 2001
From: Fabio Estevam <fabio.estevam@freescale.com>
Date: Sat, 20 Jun 2015 15:55:50 -0300
Subject: [PATCH] ASoC: max98090: Check for clk_prepare_enable() error
clk_prepare_enable() may fail, so we should better check its return value
and propagate it in the case of error.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/max98090.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index 78268f0514e9..1697340c3842 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -1801,10 +1801,13 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,
if (IS_ERR(max98090->mclk))
break;
- if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_ON)
+ if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_ON) {
clk_disable_unprepare(max98090->mclk);
- else
- clk_prepare_enable(max98090->mclk);
+ } else {
+ ret = clk_prepare_enable(max98090->mclk);
+ if (ret)
+ return ret;
+ }
break;
case SND_SOC_BIAS_STANDBY:
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread