Handle return value of clk_prepare_enable.
Subsystems (5)
cover Handle return value of clk_prepare_enable.
clk_prepare_enable() can fail here and we must check its return value.
Arvind Yadav (11):
[PATCH 01/11] ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable. [PATCH 02/11] ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable. [PATCH 03/11] ASoC: samsung: pcm: Handle return value of clk_prepare_enable. [PATCH 04/11] ASoC: samsung: i2s: Handle return value of clk_prepare_enable. [PATCH 05/11] ASoC: samsung: spdif: Handle return value of clk_prepare_enable. [PATCH 06/11] ASoC: mxs-saif: Handle return value of clk_prepare_enable/clk_prepare. [PATCH 07/11] ASoC: jz4740: Handle return value of clk_prepare_enable. [PATCH 08/11] ASoC: sun4i-spdif: Handle return value of clk_prepare_enable. [PATCH 09/11] ASoC: atmel: ac97c: Handle return value of clk_prepare_enable. [PATCH 10/11] ASoC: pxa: Handle return value of clk_prepare_enable. [PATCH 11/11] ASoC: pxa-ssp: Handle return value of clk_prepare_enable.
sound/atmel/ac97c.c | 8 +++++--- sound/soc/jz4740/jz4740-i2s.c | 21 +++++++++++++++++---- sound/soc/mxs/mxs-saif.c | 13 ++++++++++--- sound/soc/pxa/pxa-ssp.c | 23 +++++++++++++++++------ sound/soc/pxa/pxa2xx-i2s.c | 6 +++++- sound/soc/samsung/i2s.c | 19 +++++++++++++++---- sound/soc/samsung/pcm.c | 8 ++++++-- sound/soc/samsung/s3c2412-i2s.c | 4 +++- sound/soc/samsung/s3c24xx-i2s.c | 11 +++++++++-- sound/soc/samsung/spdif.c | 8 ++++++-- sound/soc/sunxi/sun4i-spdif.c | 11 ++++++++--- 11 files changed, 101 insertions(+), 31 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/11 ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable.
clk_prepare_enable() can fail here and we must check its return value.
--- sound/soc/samsung/s3c2412-i2s.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/samsung/s3c2412-i2s.c +3 -1
@@ -71,7 +71,9 @@ static int s3c2412_i2s_probe(struct snd_soc_dai *dai)/* Set MPLL as the source for IIS CLK */ clk_set_parent (s3c2412_i2s.iis_cclk,clk_get (NULL ,"mpll" )); -clk_prepare_enable (s3c2412_i2s.iis_cclk); + ret =clk_prepare_enable (s3c2412_i2s.iis_cclk); +if (ret) +return ret; s3c2412_i2s.iis_cclk = s3c2412_i2s.iis_pclk;
Signature · 1 line
1.9.1
Re: [PATCH 01/11] ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable.
Quoted 12 lines · Arvind Yadav
clk_prepare_enable()can fail here and we must check its return value.Signed-off-by Arvind Yadav <[email protected]>--- sound/soc/samsung/s3c2412-i2s.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)sound/soc/samsung/s3c2412-i2s.c +0
-0
sound/soc/samsung/s3c2412-i2s.c static int s3c2412_i2s_probe(struct snd_soc_dai *dai) · line 75
Quoted 6 lines
sound/soc/samsung/s3c2412-i2s.c +2
-1@@ -71,7 +71,9 @@ static int s3c2412_i2s_probe(struct snd_soc_dai *dai)/* Set MPLL as the source for IIS CLK */ clk_set_parent (s3c2412_i2s.iis_cclk,clk_get (NULL ,"mpll" )); -clk_prepare_enable (s3c2412_i2s.iis_cclk); + ret =clk_prepare_enable (s3c2412_i2s.iis_cclk); +if (ret)
You miss here path for error handling for things done in s3c_i2sv2_probe().
Best regards,
Krzysztof
Quoted 7 lines
sound/soc/samsung/s3c2412-i2s.c +1
-0+return ret; s3c2412_i2s.iis_cclk = s3c2412_i2s.iis_pclk;Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable." to the asoc tree
In reply to Arvind YadavThe patch
ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable.
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
Quoted 1 line
From
d2d2c0a0f0e230e9650e778d0d5c7ed6d1bcffb0Mon Sep 17 00:00:00 2001
From: Arvind Yadav <[email protected]>
Date: Tue, 25 Jul 2017 15:44:28 +0530
Subject: [PATCH] ASoC: samsung: s3c2412: Handle return value of
clk_prepare_enable.
clk_prepare_enable() can fail here and we must check its return value.
--- sound/soc/samsung/s3c2412-i2s.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/samsung/s3c2412-i2s.c +3 -1
@@ -71,7 +71,9 @@ static int s3c2412_i2s_probe(struct snd_soc_dai *dai)/* Set MPLL as the source for IIS CLK */ clk_set_parent (s3c2412_i2s.iis_cclk,clk_get (NULL ,"mpll" )); -clk_prepare_enable (s3c2412_i2s.iis_cclk); + ret =clk_prepare_enable (s3c2412_i2s.iis_cclk); +if (ret) +return ret; s3c2412_i2s.iis_cclk = s3c2412_i2s.iis_pclk;
Signature · 1 line
2.13.2
Re: Applied "ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable." to the asoc tree
Quoted 46 lines · Mark Brown
The patch
ASoC: samsung: s3c2412: Handle return value of
clk_prepare_enable.has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.gitAll 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,
MarkFrom
d2d2c0a0f0e230e9650e778d0d5c7ed6d1bcffb0Mon Sep 17 00:00:00 2001
From: Arvind Yadav <[email protected]>
Date: Tue, 25 Jul 2017 15:44:28 +0530
Subject: [PATCH] ASoC: samsung: s3c2412: Handle return value of
clk_prepare_enable.
clk_prepare_enable()can fail here and we must check its return value.Signed-off-by Arvind Yadav <[email protected]>Signed-off-by Mark Brown <[email protected]>--- sound/soc/samsung/s3c2412-i2s.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)sound/soc/samsung/s3c2412-i2s.c +0
-0
sound/soc/samsung/s3c2412-i2s.c static int s3c2412_i2s_probe(struct snd_soc_dai *dai) · line 76
Quoted 7 lines
sound/soc/samsung/s3c2412-i2s.c +3
-1@@ -71,7 +71,9 @@ static int s3c2412_i2s_probe(struct snd_soc_dai *dai)/* Set MPLL as the source for IIS CLK */ clk_set_parent (s3c2412_i2s.iis_cclk,clk_get (NULL ,"mpll" )); -clk_prepare_enable (s3c2412_i2s.iis_cclk); + ret =clk_prepare_enable (s3c2412_i2s.iis_cclk); +if (ret) +return ret;
Mark, this is the patch still discussed. It does not handle the error correctly. I think it should be dropped.
Best regards,
Krzysztof
Mark Brown
maintainerRe: Applied "ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable." to the asoc tree
Quoted 2 lines · Krzysztof Kozlowski
Mark, this is the patch still discussed. It does not handle the error correctly. I think it should be dropped.
Ugh, is that the same patch? Sorry, got lost in the big series. Now I've applied it I'd rather do incremental updates to it if possible but let's see if that can be done promptly...
Re: Applied "ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable." to the asoc tree
Quoted 8 lines · Mark Brown
Quoted 2 lines · Krzysztof Kozlowski
Mark, this is the patch still discussed. It does not handle the error correctly. I think it should be dropped.
Ugh, is that the same patch? Sorry, got lost in the big series. Now I've applied it I'd rather do incremental updates to it if possible but let's see if that can be done promptly...
Fixing this is not that critical because error path of s3c2412_i2s_probe() already did not clean up what was needed. So merely we are duplicating same wrong pattern.
I can prepare an incremental fix tomorrow or the day after, so, Arvind, if you can do it faster, please go ahead.
Best regards,
Krzysztof
PATCH 2/11 ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable.
In reply to Arvind Yadavclk_prepare_enable() can fail here and we must check its return value.
--- sound/soc/samsung/s3c24xx-i2s.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
sound/soc/samsung/s3c24xx-i2s.c +9 -2
@@ -340,6 +340,7 @@ u32 s3c24xx_i2s_get_clockrate(void)static int s3c24xx_i2s_probe (struct snd_soc_dai *dai) { +int ret;snd_soc_dai_init_dma_data (dai, &s3c24xx_i2s_pcm_stereo_out, &s3c24xx_i2s_pcm_stereo_in);
@@ -348,7 +349,9 @@ static int s3c24xx_i2s_probe(struct snd_soc_dai *dai)pr_err ("failed to get iis_clock\n" );return PTR_ERR (s3c24xx_i2s.iis_clk); } -clk_prepare_enable (s3c24xx_i2s.iis_clk); + ret =clk_prepare_enable (s3c24xx_i2s.iis_clk); +if (ret) +return ret;/* Configure the I2S pins (GPE0...GPE4) in correct mode */ s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
@@ -377,7 +380,11 @@ static int s3c24xx_i2s_suspend(struct snd_soc_dai *cpu_dai)static int s3c24xx_i2s_resume (struct snd_soc_dai *cpu_dai) { -clk_prepare_enable (s3c24xx_i2s.iis_clk); +int ret; + + ret =clk_prepare_enable (s3c24xx_i2s.iis_clk); +if (ret) +return ret;writel (s3c24xx_i2s.iiscon, s3c24xx_i2s.regs +S3C2410_IISCON );writel (s3c24xx_i2s.iismod, s3c24xx_i2s.regs +S3C2410_IISMOD );
Signature · 1 line
1.9.1
Re: [PATCH 02/11] ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable.
Quoted 7 lines · Arvind Yadav
clk_prepare_enable()can fail here and we must check its return value.Signed-off-by Arvind Yadav <[email protected]>--- sound/soc/samsung/s3c24xx-i2s.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
Best regards,
Krzysztof
Mark Brown
maintainerApplied "ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable." to the asoc tree
In reply to Arvind YadavThe patch
ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable.
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
Quoted 1 line
From
8698475a94d0b7eb21efaa346d507dc4932f2032Mon Sep 17 00:00:00 2001
From: Arvind Yadav <[email protected]>
Date: Tue, 25 Jul 2017 15:44:29 +0530
Subject: [PATCH] ASoC: samsung: s3c24xx: Handle return value of
clk_prepare_enable.
clk_prepare_enable() can fail here and we must check its return value.
--- sound/soc/samsung/s3c24xx-i2s.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
sound/soc/samsung/s3c24xx-i2s.c +9 -2
@@ -340,6 +340,7 @@ EXPORT_SYMBOL_GPL(s3c24xx_i2s_get_clockrate);static int s3c24xx_i2s_probe (struct snd_soc_dai *dai) { +int ret;snd_soc_dai_init_dma_data (dai, &s3c24xx_i2s_pcm_stereo_out, &s3c24xx_i2s_pcm_stereo_in);
@@ -348,7 +349,9 @@ static int s3c24xx_i2s_probe(struct snd_soc_dai *dai)pr_err ("failed to get iis_clock\n" );return PTR_ERR (s3c24xx_i2s.iis_clk); } -clk_prepare_enable (s3c24xx_i2s.iis_clk); + ret =clk_prepare_enable (s3c24xx_i2s.iis_clk); +if (ret) +return ret;/* Configure the I2S pins (GPE0...GPE4) in correct mode */ s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
@@ -377,7 +380,11 @@ static int s3c24xx_i2s_suspend(struct snd_soc_dai *cpu_dai)static int s3c24xx_i2s_resume (struct snd_soc_dai *cpu_dai) { -clk_prepare_enable (s3c24xx_i2s.iis_clk); +int ret; + + ret =clk_prepare_enable (s3c24xx_i2s.iis_clk); +if (ret) +return ret;writel (s3c24xx_i2s.iiscon, s3c24xx_i2s.regs +S3C2410_IISCON );writel (s3c24xx_i2s.iismod, s3c24xx_i2s.regs +S3C2410_IISMOD );
Signature · 1 line
2.13.2
PATCH 3/11 ASoC: samsung: pcm: Handle return value of clk_prepare_enable.
In reply to Arvind Yadavclk_prepare_enable() can fail here and we must check its return value.
--- sound/soc/samsung/pcm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
sound/soc/samsung/pcm.c +6 -2
@@ -522,7 +522,9 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev)dev_err (&pdev->dev,"failed to get audio-bus clock\n" );return PTR_ERR (pcm->cclk); } -clk_prepare_enable (pcm->cclk); + ret =clk_prepare_enable (pcm->cclk); +if (ret) +return ret;/* record our pcm structure for later use in the callbacks */ dev_set_drvdata (&pdev->dev, pcm);
@@ -533,7 +535,9 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev) ret =PTR_ERR (pcm->pclk); goto err_dis_cclk; } -clk_prepare_enable (pcm->pclk); + ret =clk_prepare_enable (pcm->pclk); +if (ret) + goto err_dis_cclk; s3c_pcm_stereo_in[pdev->id].addr = mem_res->start +S3C_PCM_RXFIFO ; s3c_pcm_stereo_out[pdev->id].addr = mem_res->start +S3C_PCM_TXFIFO ;
Signature · 1 line
1.9.1
Re: [PATCH 03/11] ASoC: samsung: pcm: Handle return value of clk_prepare_enable.
Quoted 7 lines · Arvind Yadav
clk_prepare_enable()can fail here and we must check its return value.Signed-off-by Arvind Yadav <[email protected]>--- sound/soc/samsung/pcm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
Best regards,
Krzysztof
Mark Brown
maintainerApplied "ASoC: samsung: pcm: Handle return value of clk_prepare_enable." to the asoc tree
In reply to Arvind YadavThe patch
ASoC: samsung: pcm: Handle return value of clk_prepare_enable.
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
Quoted 1 line
From
a7ad9a88300c813a945793e9dae84ceaf7809141Mon Sep 17 00:00:00 2001
From: Arvind Yadav <[email protected]>
Date: Tue, 25 Jul 2017 15:44:30 +0530
Subject: [PATCH] ASoC: samsung: pcm: Handle return value of
clk_prepare_enable.
clk_prepare_enable() can fail here and we must check its return value.
--- sound/soc/samsung/pcm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
sound/soc/samsung/pcm.c +6 -2
@@ -522,7 +522,9 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev)dev_err (&pdev->dev,"failed to get audio-bus clock\n" );return PTR_ERR (pcm->cclk); } -clk_prepare_enable (pcm->cclk); + ret =clk_prepare_enable (pcm->cclk); +if (ret) +return ret;/* record our pcm structure for later use in the callbacks */ dev_set_drvdata (&pdev->dev, pcm);
@@ -533,7 +535,9 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev) ret =PTR_ERR (pcm->pclk); goto err_dis_cclk; } -clk_prepare_enable (pcm->pclk); + ret =clk_prepare_enable (pcm->pclk); +if (ret) + goto err_dis_cclk; s3c_pcm_stereo_in[pdev->id].addr = mem_res->start +S3C_PCM_RXFIFO ; s3c_pcm_stereo_out[pdev->id].addr = mem_res->start +S3C_PCM_TXFIFO ;
Signature · 1 line
2.13.2
PATCH 4/11 ASoC: samsung: i2s: Handle return value of clk_prepare_enable.
In reply to Arvind Yadavclk_prepare_enable() can fail here and we must check its return value.
--- sound/soc/samsung/i2s.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)
sound/soc/samsung/i2s.c +15 -4
@@ -550,7 +550,9 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, goto err; } -clk_prepare_enable (i2s->op_clk); + ret =clk_prepare_enable (i2s->op_clk); +if (ret) + goto err; i2s->rclk_srcrate =clk_get_rate (i2s->op_clk);/* Over-ride the other's */
@@ -1132,10 +1134,19 @@ static int i2s_runtime_suspend(struct device *dev)static int i2s_runtime_resume (struct device *dev) {struct i2s_dai *i2s =dev_get_drvdata (dev); +int ret; -clk_prepare_enable (i2s->clk); -if (i2s->op_clk) -clk_prepare_enable (i2s->op_clk); + ret =clk_prepare_enable (i2s->clk); +if (ret) +return ret; + +if (i2s->op_clk) { + ret =clk_prepare_enable (i2s->op_clk); +if (ret) { +clk_disable_unprepare (i2s->clk); +return ret; + } + }writel (i2s->suspend_i2scon, i2s->addr +I2SCON );writel (i2s->suspend_i2smod, i2s->addr +I2SMOD );
Signature · 1 line
1.9.1
Re: [PATCH 04/11] ASoC: samsung: i2s: Handle return value of clk_prepare_enable.
Quoted 7 lines · Arvind Yadav
clk_prepare_enable()can fail here and we must check its return value.Signed-off-by Arvind Yadav <[email protected]>--- sound/soc/samsung/i2s.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)
Best regards,
Krzysztof
Mark Brown
maintainerApplied "ASoC: samsung: i2s: Handle return value of clk_prepare_enable." to the asoc tree
In reply to Arvind YadavThe patch
ASoC: samsung: i2s: Handle return value of clk_prepare_enable.
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
Quoted 1 line
From
f5c97c7b0438bec0aad9738af1baa698dae5bc09Mon Sep 17 00:00:00 2001
From: Arvind Yadav <[email protected]>
Date: Tue, 25 Jul 2017 15:44:31 +0530
Subject: [PATCH] ASoC: samsung: i2s: Handle return value of
clk_prepare_enable.
clk_prepare_enable() can fail here and we must check its return value.
--- sound/soc/samsung/i2s.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)
sound/soc/samsung/i2s.c +15 -4
@@ -551,7 +551,9 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, goto err; } -clk_prepare_enable (i2s->op_clk); + ret =clk_prepare_enable (i2s->op_clk); +if (ret) + goto err; i2s->rclk_srcrate =clk_get_rate (i2s->op_clk);/* Over-ride the other's */
@@ -1133,10 +1135,19 @@ static int i2s_runtime_suspend(struct device *dev)static int i2s_runtime_resume (struct device *dev) {struct i2s_dai *i2s =dev_get_drvdata (dev); +int ret; -clk_prepare_enable (i2s->clk); -if (i2s->op_clk) -clk_prepare_enable (i2s->op_clk); + ret =clk_prepare_enable (i2s->clk); +if (ret) +return ret; + +if (i2s->op_clk) { + ret =clk_prepare_enable (i2s->op_clk); +if (ret) { +clk_disable_unprepare (i2s->clk); +return ret; + } + }writel (i2s->suspend_i2scon, i2s->addr +I2SCON );writel (i2s->suspend_i2smod, i2s->addr +I2SMOD );
Signature · 1 line
2.13.2
PATCH 5/11 ASoC: samsung: spdif: Handle return value of clk_prepare_enable.
In reply to Arvind Yadavclk_prepare_enable() can fail here and we must check its return value.
--- sound/soc/samsung/spdif.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
sound/soc/samsung/spdif.c +6 -2
@@ -391,7 +391,9 @@ static int spdif_probe(struct platform_device *pdev) ret = -ENOENT ; goto err0; } -clk_prepare_enable (spdif->pclk); + ret =clk_prepare_enable (spdif->pclk); +if (ret) + goto err0; spdif->sclk =devm_clk_get (&pdev->dev,"sclk_spdif" );if (IS_ERR (spdif->sclk)) {
@@ -399,7 +401,9 @@ static int spdif_probe(struct platform_device *pdev) ret = -ENOENT ; goto err1; } -clk_prepare_enable (spdif->sclk); + ret =clk_prepare_enable (spdif->sclk); +if (ret) + goto err1;/* Request S/PDIF Register's memory region */ if (!request_mem_region(mem_res->start,
Signature · 1 line
1.9.1
Re: [PATCH 05/11] ASoC: samsung: spdif: Handle return value of clk_prepare_enable.
Quoted 7 lines · Arvind Yadav
clk_prepare_enable()can fail here and we must check its return value.Signed-off-by Arvind Yadav <[email protected]>--- sound/soc/samsung/spdif.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
Best regards,
Krzysztof
Mark Brown
maintainerApplied "ASoC: samsung: spdif: Handle return value of clk_prepare_enable." to the asoc tree
In reply to Arvind YadavThe patch
ASoC: samsung: spdif: Handle return value of clk_prepare_enable.
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
Quoted 1 line
From
0f11daf10b4ac6a6c8ea6b39552f119c595b5406Mon Sep 17 00:00:00 2001
From: Arvind Yadav <[email protected]>
Date: Tue, 25 Jul 2017 15:44:32 +0530
Subject: [PATCH] ASoC: samsung: spdif: Handle return value of
clk_prepare_enable.
clk_prepare_enable() can fail here and we must check its return value.
--- sound/soc/samsung/spdif.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
sound/soc/samsung/spdif.c +6 -2
@@ -391,7 +391,9 @@ static int spdif_probe(struct platform_device *pdev) ret = -ENOENT ; goto err0; } -clk_prepare_enable (spdif->pclk); + ret =clk_prepare_enable (spdif->pclk); +if (ret) + goto err0; spdif->sclk =devm_clk_get (&pdev->dev,"sclk_spdif" );if (IS_ERR (spdif->sclk)) {
@@ -399,7 +401,9 @@ static int spdif_probe(struct platform_device *pdev) ret = -ENOENT ; goto err1; } -clk_prepare_enable (spdif->sclk); + ret =clk_prepare_enable (spdif->sclk); +if (ret) + goto err1;/* Request S/PDIF Register's memory region */ if (!request_mem_region(mem_res->start,
Signature · 1 line
2.13.2
PATCH 6/11 ASoC: mxs-saif: Handle return value of clk_prepare_enable/clk_prepare.
In reply to Arvind Yadavclk_prepare_enable() and clk_prepare() can fail here and we must check its return value.
--- sound/soc/mxs/mxs-saif.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
sound/soc/mxs/mxs-saif.c +10 -3
@@ -125,7 +125,9 @@ static int mxs_saif_set_clk(struct mxs_saif *saif,* * If MCLK is not used, we just set saif clk to 512*fs. */ -clk_prepare_enable (master_saif->clk); + ret =clk_prepare_enable (master_saif->clk); +if (ret) +return ret;if (master_saif->mclk_in_use) {switch (mclk / rate) {
@@ -388,6 +390,7 @@ static int mxs_saif_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) {struct mxs_saif *saif =snd_soc_dai_get_drvdata (cpu_dai); +int ret;/* clear error status to 0 for each re-open */ saif->fifo_underrun =0 ;
@@ -401,7 +404,9 @@ static int mxs_saif_startup(struct snd_pcm_substream *substream,__raw_writel (BM_SAIF_CTRL_CLKGATE , saif->base +SAIF_CTRL +MXS_CLR_ADDR ); -clk_prepare (saif->clk); + ret =clk_prepare (saif->clk); +if (ret) +return ret;return 0 ; }
@@ -468,7 +473,9 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream,if (ret)return ret; -clk_prepare (master_saif->clk); + ret =clk_prepare (master_saif->clk); +if (ret) +return ret; } scr =__raw_readl (saif->base +SAIF_CTRL );
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: mxs-saif: Handle return value of clk_prepare_enable/clk_prepare." to the asoc tree
The patch
ASoC: mxs-saif: Handle return value of clk_prepare_enable/clk_prepare.
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
Quoted 1 line
From
0d97ee867958a092f02e9cd7c865c278bcec18a6Mon Sep 17 00:00:00 2001
From: Arvind Yadav <[email protected]>
Date: Tue, 25 Jul 2017 15:44:33 +0530
Subject: [PATCH] ASoC: mxs-saif: Handle return value of
clk_prepare_enable/clk_prepare.
clk_prepare_enable() and clk_prepare() can fail here and we must check its return value.
--- sound/soc/mxs/mxs-saif.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
sound/soc/mxs/mxs-saif.c +10 -3
@@ -125,7 +125,9 @@ static int mxs_saif_set_clk(struct mxs_saif *saif,* * If MCLK is not used, we just set saif clk to 512*fs. */ -clk_prepare_enable (master_saif->clk); + ret =clk_prepare_enable (master_saif->clk); +if (ret) +return ret;if (master_saif->mclk_in_use) {switch (mclk / rate) {
@@ -388,6 +390,7 @@ static int mxs_saif_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) {struct mxs_saif *saif =snd_soc_dai_get_drvdata (cpu_dai); +int ret;/* clear error status to 0 for each re-open */ saif->fifo_underrun =0 ;
@@ -401,7 +404,9 @@ static int mxs_saif_startup(struct snd_pcm_substream *substream,__raw_writel (BM_SAIF_CTRL_CLKGATE , saif->base +SAIF_CTRL +MXS_CLR_ADDR ); -clk_prepare (saif->clk); + ret =clk_prepare (saif->clk); +if (ret) +return ret;return 0 ; }
@@ -468,7 +473,9 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream,if (ret)return ret; -clk_prepare (master_saif->clk); + ret =clk_prepare (master_saif->clk); +if (ret) +return ret; } scr =__raw_readl (saif->base +SAIF_CTRL );
Signature · 1 line
2.13.2
PATCH 7/11 ASoC: jz4740: Handle return value of clk_prepare_enable.
In reply to Arvind Yadavclk_prepare_enable() can fail here and we must check its return value.
--- sound/soc/jz4740/jz4740-i2s.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-)
sound/soc/jz4740/jz4740-i2s.c +17 -4
@@ -133,6 +133,7 @@ static int jz4740_i2s_startup(struct snd_pcm_substream *substream, {struct jz4740_i2s *i2s =snd_soc_dai_get_drvdata (dai);uint32_t conf, ctrl; +int ret;if (dai->active)return 0 ;
@@ -141,7 +142,9 @@ static int jz4740_i2s_startup(struct snd_pcm_substream *substream, ctrl |=JZ_AIC_CTRL_FLUSH ;jz4740_i2s_write (i2s,JZ_REG_AIC_CTRL , ctrl); -clk_prepare_enable (i2s->clk_i2s); + ret =clk_prepare_enable (i2s->clk_i2s); +if (ret) +return ret; conf =jz4740_i2s_read (i2s,JZ_REG_AIC_CONF ); conf |=JZ_AIC_CONF_ENABLE ;
@@ -352,11 +355,18 @@ static int jz4740_i2s_resume(struct snd_soc_dai *dai) {struct jz4740_i2s *i2s =snd_soc_dai_get_drvdata (dai);uint32_t conf; +int ret; -clk_prepare_enable (i2s->clk_aic); + ret =clk_prepare_enable (i2s->clk_aic); +if (ret) +return ret;if (dai->active) { -clk_prepare_enable (i2s->clk_i2s); + ret =clk_prepare_enable (i2s->clk_i2s); +if (ret) { +clk_disable_unprepare (i2s->clk_aic); +return ret; + } conf =jz4740_i2s_read (i2s,JZ_REG_AIC_CONF ); conf |=JZ_AIC_CONF_ENABLE ;
@@ -387,8 +397,11 @@ static int jz4740_i2s_dai_probe(struct snd_soc_dai *dai) {struct jz4740_i2s *i2s =snd_soc_dai_get_drvdata (dai);uint32_t conf; +int ret; -clk_prepare_enable (i2s->clk_aic); + ret =clk_prepare_enable (i2s->clk_aic); +if (ret) +return ret;jz4740_i2c_init_pcm_config (i2s); snd_soc_dai_init_dma_data(dai, &i2s->playback_dma_data,
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: jz4740: Handle return value of clk_prepare_enable." to the asoc tree
The patch
ASoC: jz4740: Handle return value of clk_prepare_enable.
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
Quoted 1 line
From
eae37345c8653a3c797c1763c95289d924ee37a2Mon Sep 17 00:00:00 2001
From: Arvind Yadav <[email protected]>
Date: Tue, 25 Jul 2017 15:44:34 +0530
Subject: [PATCH] ASoC: jz4740: Handle return value of clk_prepare_enable.
clk_prepare_enable() can fail here and we must check its return value.
--- sound/soc/jz4740/jz4740-i2s.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-)
sound/soc/jz4740/jz4740-i2s.c +17 -4
@@ -133,6 +133,7 @@ static int jz4740_i2s_startup(struct snd_pcm_substream *substream, {struct jz4740_i2s *i2s =snd_soc_dai_get_drvdata (dai);uint32_t conf, ctrl; +int ret;if (dai->active)return 0 ;
@@ -141,7 +142,9 @@ static int jz4740_i2s_startup(struct snd_pcm_substream *substream, ctrl |=JZ_AIC_CTRL_FLUSH ;jz4740_i2s_write (i2s,JZ_REG_AIC_CTRL , ctrl); -clk_prepare_enable (i2s->clk_i2s); + ret =clk_prepare_enable (i2s->clk_i2s); +if (ret) +return ret; conf =jz4740_i2s_read (i2s,JZ_REG_AIC_CONF ); conf |=JZ_AIC_CONF_ENABLE ;
@@ -352,11 +355,18 @@ static int jz4740_i2s_resume(struct snd_soc_dai *dai) {struct jz4740_i2s *i2s =snd_soc_dai_get_drvdata (dai);uint32_t conf; +int ret; -clk_prepare_enable (i2s->clk_aic); + ret =clk_prepare_enable (i2s->clk_aic); +if (ret) +return ret;if (dai->active) { -clk_prepare_enable (i2s->clk_i2s); + ret =clk_prepare_enable (i2s->clk_i2s); +if (ret) { +clk_disable_unprepare (i2s->clk_aic); +return ret; + } conf =jz4740_i2s_read (i2s,JZ_REG_AIC_CONF ); conf |=JZ_AIC_CONF_ENABLE ;
@@ -387,8 +397,11 @@ static int jz4740_i2s_dai_probe(struct snd_soc_dai *dai) {struct jz4740_i2s *i2s =snd_soc_dai_get_drvdata (dai);uint32_t conf; +int ret; -clk_prepare_enable (i2s->clk_aic); + ret =clk_prepare_enable (i2s->clk_aic); +if (ret) +return ret;jz4740_i2c_init_pcm_config (i2s); snd_soc_dai_init_dma_data(dai, &i2s->playback_dma_data,
Signature · 1 line
2.13.2