All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] Handle return value of clk_prepare_enable.
@ 2017-07-25 10:14 Arvind Yadav
  2017-07-25 10:14 ` [PATCH 01/11] ASoC: samsung: s3c2412: " Arvind Yadav
                   ` (6 more replies)
  0 siblings, 7 replies; 34+ messages in thread
From: Arvind Yadav @ 2017-07-25 10:14 UTC (permalink / raw)
  To: perex, tiwai, broonie, krzk, sbkim73, lgirdwood; +Cc: alsa-devel, linux-kernel

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(-)

-- 
1.9.1

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

* [PATCH 01/11] ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable.
  2017-07-25 10:14 [PATCH 00/11] Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-07-25 10:14 ` Arvind Yadav
  2017-07-25 17:43     ` Krzysztof Kozlowski
  2017-07-26 14:17     ` Mark Brown
  2017-07-25 10:14 ` [PATCH 02/11] ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable Arvind Yadav
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 34+ messages in thread
From: Arvind Yadav @ 2017-07-25 10:14 UTC (permalink / raw)
  To: perex, tiwai, broonie, krzk, sbkim73, lgirdwood; +Cc: alsa-devel, linux-kernel

clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 sound/soc/samsung/s3c2412-i2s.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
index 0a47182..bcd1cbd 100644
--- a/sound/soc/samsung/s3c2412-i2s.c
+++ b/sound/soc/samsung/s3c2412-i2s.c
@@ -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;
 
-- 
1.9.1

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

* [PATCH 02/11] ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable.
  2017-07-25 10:14 [PATCH 00/11] Handle return value of clk_prepare_enable Arvind Yadav
  2017-07-25 10:14 ` [PATCH 01/11] ASoC: samsung: s3c2412: " Arvind Yadav
@ 2017-07-25 10:14 ` Arvind Yadav
  2017-07-25 17:50     ` Krzysztof Kozlowski
  2017-07-26 14:17     ` Mark Brown
  2017-07-25 10:14 ` [PATCH 03/11] ASoC: samsung: pcm: Handle return value of clk_prepare_enable Arvind Yadav
                   ` (4 subsequent siblings)
  6 siblings, 2 replies; 34+ messages in thread
From: Arvind Yadav @ 2017-07-25 10:14 UTC (permalink / raw)
  To: perex, tiwai, broonie, krzk, sbkim73, lgirdwood; +Cc: alsa-devel, linux-kernel

clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 sound/soc/samsung/s3c24xx-i2s.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c
index 91e6871..8d58d02 100644
--- a/sound/soc/samsung/s3c24xx-i2s.c
+++ b/sound/soc/samsung/s3c24xx-i2s.c
@@ -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);
-- 
1.9.1

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

* [PATCH 03/11] ASoC: samsung: pcm: Handle return value of clk_prepare_enable.
  2017-07-25 10:14 [PATCH 00/11] Handle return value of clk_prepare_enable Arvind Yadav
  2017-07-25 10:14 ` [PATCH 01/11] ASoC: samsung: s3c2412: " Arvind Yadav
  2017-07-25 10:14 ` [PATCH 02/11] ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-07-25 10:14 ` Arvind Yadav
  2017-07-25 17:51   ` Krzysztof Kozlowski
  2017-07-26 14:17     ` Mark Brown
  2017-07-25 10:14 ` [PATCH 04/11] ASoC: samsung: i2s: Handle return value of clk_prepare_enable Arvind Yadav
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 34+ messages in thread
From: Arvind Yadav @ 2017-07-25 10:14 UTC (permalink / raw)
  To: perex, tiwai, broonie, krzk, sbkim73, lgirdwood; +Cc: alsa-devel, linux-kernel

clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 sound/soc/samsung/pcm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c
index d50a637..37f95ee 100644
--- a/sound/soc/samsung/pcm.c
+++ b/sound/soc/samsung/pcm.c
@@ -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;
-- 
1.9.1

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

* [PATCH 04/11] ASoC: samsung: i2s: Handle return value of clk_prepare_enable.
  2017-07-25 10:14 [PATCH 00/11] Handle return value of clk_prepare_enable Arvind Yadav
                   ` (2 preceding siblings ...)
  2017-07-25 10:14 ` [PATCH 03/11] ASoC: samsung: pcm: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-07-25 10:14 ` Arvind Yadav
  2017-07-25 17:58     ` Krzysztof Kozlowski
  2017-07-26 14:17     ` Mark Brown
  2017-07-25 10:14 ` [PATCH 05/11] ASoC: samsung: spdif: Handle return value of clk_prepare_enable Arvind Yadav
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 34+ messages in thread
From: Arvind Yadav @ 2017-07-25 10:14 UTC (permalink / raw)
  To: perex, tiwai, broonie, krzk, sbkim73, lgirdwood; +Cc: alsa-devel, linux-kernel

clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 sound/soc/samsung/i2s.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index af3ba4d..b554497 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -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);
-- 
1.9.1

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

* [PATCH 05/11] ASoC: samsung: spdif: Handle return value of clk_prepare_enable.
  2017-07-25 10:14 [PATCH 00/11] Handle return value of clk_prepare_enable Arvind Yadav
                   ` (3 preceding siblings ...)
  2017-07-25 10:14 ` [PATCH 04/11] ASoC: samsung: i2s: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-07-25 10:14 ` Arvind Yadav
  2017-07-25 18:01     ` Krzysztof Kozlowski
  2017-07-26 14:17     ` Mark Brown
  2017-07-25 10:14 ` [PATCH 06/11] ASoC: mxs-saif: Handle return value of clk_prepare_enable/clk_prepare Arvind Yadav
  2017-07-25 10:14 ` [PATCH 07/11] ASoC: jz4740: Handle return value of clk_prepare_enable Arvind Yadav
  6 siblings, 2 replies; 34+ messages in thread
From: Arvind Yadav @ 2017-07-25 10:14 UTC (permalink / raw)
  To: perex, tiwai, broonie, krzk, sbkim73, lgirdwood; +Cc: alsa-devel, linux-kernel

clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 sound/soc/samsung/spdif.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c
index 779504f..cb59911 100644
--- a/sound/soc/samsung/spdif.c
+++ b/sound/soc/samsung/spdif.c
@@ -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,
-- 
1.9.1

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

* [PATCH 06/11] ASoC: mxs-saif: Handle return value of clk_prepare_enable/clk_prepare.
  2017-07-25 10:14 [PATCH 00/11] Handle return value of clk_prepare_enable Arvind Yadav
                   ` (4 preceding siblings ...)
  2017-07-25 10:14 ` [PATCH 05/11] ASoC: samsung: spdif: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-07-25 10:14 ` Arvind Yadav
  2017-07-26 14:16     ` Mark Brown
  2017-07-25 10:14 ` [PATCH 07/11] ASoC: jz4740: Handle return value of clk_prepare_enable Arvind Yadav
  6 siblings, 1 reply; 34+ messages in thread
From: Arvind Yadav @ 2017-07-25 10:14 UTC (permalink / raw)
  To: perex, tiwai, broonie, krzk, sbkim73, lgirdwood; +Cc: alsa-devel, linux-kernel

clk_prepare_enable() and clk_prepare() can fail here and
we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 sound/soc/mxs/mxs-saif.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index b42f301..156aa7c 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -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);
-- 
1.9.1

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

* [PATCH 07/11] ASoC: jz4740: Handle return value of clk_prepare_enable.
  2017-07-25 10:14 [PATCH 00/11] Handle return value of clk_prepare_enable Arvind Yadav
                   ` (5 preceding siblings ...)
  2017-07-25 10:14 ` [PATCH 06/11] ASoC: mxs-saif: Handle return value of clk_prepare_enable/clk_prepare Arvind Yadav
@ 2017-07-25 10:14 ` Arvind Yadav
  2017-07-26 14:16     ` Mark Brown
  6 siblings, 1 reply; 34+ messages in thread
From: Arvind Yadav @ 2017-07-25 10:14 UTC (permalink / raw)
  To: perex, tiwai, broonie, krzk, sbkim73, lgirdwood; +Cc: alsa-devel, linux-kernel

clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 sound/soc/jz4740/jz4740-i2s.c | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/sound/soc/jz4740/jz4740-i2s.c b/sound/soc/jz4740/jz4740-i2s.c
index 794a349..99394c0 100644
--- a/sound/soc/jz4740/jz4740-i2s.c
+++ b/sound/soc/jz4740/jz4740-i2s.c
@@ -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,
-- 
1.9.1

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

* Re: [PATCH 01/11] ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable.
  2017-07-25 10:14 ` [PATCH 01/11] ASoC: samsung: s3c2412: " Arvind Yadav
@ 2017-07-25 17:43     ` Krzysztof Kozlowski
  2017-07-26 14:17     ` Mark Brown
  1 sibling, 0 replies; 34+ messages in thread
From: Krzysztof Kozlowski @ 2017-07-25 17:43 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: perex, tiwai, broonie, sbkim73, lgirdwood, alsa-devel, linux-kernel

On Tue, Jul 25, 2017 at 03:44:28PM +0530, Arvind Yadav wrote:
> clk_prepare_enable() can fail here and we must check its return value.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>  sound/soc/samsung/s3c2412-i2s.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
> index 0a47182..bcd1cbd 100644
> --- a/sound/soc/samsung/s3c2412-i2s.c
> +++ b/sound/soc/samsung/s3c2412-i2s.c
> @@ -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

> +		return ret;
>  
>  	s3c2412_i2s.iis_cclk = s3c2412_i2s.iis_pclk;
>  
> -- 
> 1.9.1
> 

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

* Re: [PATCH 01/11] ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable.
@ 2017-07-25 17:43     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 34+ messages in thread
From: Krzysztof Kozlowski @ 2017-07-25 17:43 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: alsa-devel, sbkim73, linux-kernel, lgirdwood, tiwai, broonie

On Tue, Jul 25, 2017 at 03:44:28PM +0530, Arvind Yadav wrote:
> clk_prepare_enable() can fail here and we must check its return value.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>  sound/soc/samsung/s3c2412-i2s.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
> index 0a47182..bcd1cbd 100644
> --- a/sound/soc/samsung/s3c2412-i2s.c
> +++ b/sound/soc/samsung/s3c2412-i2s.c
> @@ -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

> +		return ret;
>  
>  	s3c2412_i2s.iis_cclk = s3c2412_i2s.iis_pclk;
>  
> -- 
> 1.9.1
> 

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

* Re: [PATCH 02/11] ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable.
  2017-07-25 10:14 ` [PATCH 02/11] ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-07-25 17:50     ` Krzysztof Kozlowski
  2017-07-26 14:17     ` Mark Brown
  1 sibling, 0 replies; 34+ messages in thread
From: Krzysztof Kozlowski @ 2017-07-25 17:50 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: perex, tiwai, broonie, sbkim73, lgirdwood, alsa-devel, linux-kernel

On Tue, Jul 25, 2017 at 03:44:29PM +0530, Arvind Yadav wrote:
> clk_prepare_enable() can fail here and we must check its return value.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>  sound/soc/samsung/s3c24xx-i2s.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

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

* Re: [PATCH 02/11] ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable.
@ 2017-07-25 17:50     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 34+ messages in thread
From: Krzysztof Kozlowski @ 2017-07-25 17:50 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: alsa-devel, sbkim73, linux-kernel, lgirdwood, tiwai, broonie

On Tue, Jul 25, 2017 at 03:44:29PM +0530, Arvind Yadav wrote:
> clk_prepare_enable() can fail here and we must check its return value.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>  sound/soc/samsung/s3c24xx-i2s.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

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

* Re: [PATCH 03/11] ASoC: samsung: pcm: Handle return value of clk_prepare_enable.
  2017-07-25 10:14 ` [PATCH 03/11] ASoC: samsung: pcm: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-07-25 17:51   ` Krzysztof Kozlowski
  2017-07-26 14:17     ` Mark Brown
  1 sibling, 0 replies; 34+ messages in thread
From: Krzysztof Kozlowski @ 2017-07-25 17:51 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: perex, tiwai, broonie, sbkim73, lgirdwood, alsa-devel, linux-kernel

On Tue, Jul 25, 2017 at 03:44:30PM +0530, Arvind Yadav wrote:
> clk_prepare_enable() can fail here and we must check its return value.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>  sound/soc/samsung/pcm.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

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

* Re: [PATCH 04/11] ASoC: samsung: i2s: Handle return value of clk_prepare_enable.
  2017-07-25 10:14 ` [PATCH 04/11] ASoC: samsung: i2s: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-07-25 17:58     ` Krzysztof Kozlowski
  2017-07-26 14:17     ` Mark Brown
  1 sibling, 0 replies; 34+ messages in thread
From: Krzysztof Kozlowski @ 2017-07-25 17:58 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: perex, tiwai, broonie, sbkim73, lgirdwood, alsa-devel, linux-kernel

On Tue, Jul 25, 2017 at 03:44:31PM +0530, Arvind Yadav wrote:
> clk_prepare_enable() can fail here and we must check its return value.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>  sound/soc/samsung/i2s.c | 19 +++++++++++++++----
>  1 file changed, 15 insertions(+), 4 deletions(-)
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

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

* Re: [PATCH 04/11] ASoC: samsung: i2s: Handle return value of clk_prepare_enable.
@ 2017-07-25 17:58     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 34+ messages in thread
From: Krzysztof Kozlowski @ 2017-07-25 17:58 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: alsa-devel, sbkim73, linux-kernel, lgirdwood, tiwai, broonie

On Tue, Jul 25, 2017 at 03:44:31PM +0530, Arvind Yadav wrote:
> clk_prepare_enable() can fail here and we must check its return value.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>  sound/soc/samsung/i2s.c | 19 +++++++++++++++----
>  1 file changed, 15 insertions(+), 4 deletions(-)
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

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

* Re: [PATCH 05/11] ASoC: samsung: spdif: Handle return value of clk_prepare_enable.
  2017-07-25 10:14 ` [PATCH 05/11] ASoC: samsung: spdif: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-07-25 18:01     ` Krzysztof Kozlowski
  2017-07-26 14:17     ` Mark Brown
  1 sibling, 0 replies; 34+ messages in thread
From: Krzysztof Kozlowski @ 2017-07-25 18:01 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: perex, tiwai, broonie, sbkim73, lgirdwood, alsa-devel, linux-kernel

On Tue, Jul 25, 2017 at 03:44:32PM +0530, Arvind Yadav wrote:
> clk_prepare_enable() can fail here and we must check its return value.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>  sound/soc/samsung/spdif.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

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

* Re: [PATCH 05/11] ASoC: samsung: spdif: Handle return value of clk_prepare_enable.
@ 2017-07-25 18:01     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 34+ messages in thread
From: Krzysztof Kozlowski @ 2017-07-25 18:01 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: alsa-devel, sbkim73, linux-kernel, lgirdwood, tiwai, broonie

On Tue, Jul 25, 2017 at 03:44:32PM +0530, Arvind Yadav wrote:
> clk_prepare_enable() can fail here and we must check its return value.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>  sound/soc/samsung/spdif.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

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

* Applied "ASoC: jz4740: Handle return value of clk_prepare_enable." to the asoc tree
  2017-07-25 10:14 ` [PATCH 07/11] ASoC: jz4740: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-07-26 14:16     ` Mark Brown
  0 siblings, 0 replies; 34+ messages in thread
From: Mark Brown @ 2017-07-26 14:16 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: Mark Brown, perex, tiwai, broonie, krzk, sbkim73, lgirdwood,
	alsa-devel, linux-kernel, alsa-devel

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

>From eae37345c8653a3c797c1763c95289d924ee37a2 Mon Sep 17 00:00:00 2001
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/jz4740/jz4740-i2s.c | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/sound/soc/jz4740/jz4740-i2s.c b/sound/soc/jz4740/jz4740-i2s.c
index 794a3499e567..99394c036998 100644
--- a/sound/soc/jz4740/jz4740-i2s.c
+++ b/sound/soc/jz4740/jz4740-i2s.c
@@ -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,
-- 
2.13.2

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

* Applied "ASoC: jz4740: Handle return value of clk_prepare_enable." to the asoc tree
@ 2017-07-26 14:16     ` Mark Brown
  0 siblings, 0 replies; 34+ messages in thread
From: Mark Brown @ 2017-07-26 14:16 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: Mark Brown, perex, tiwai

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

>From eae37345c8653a3c797c1763c95289d924ee37a2 Mon Sep 17 00:00:00 2001
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/jz4740/jz4740-i2s.c | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/sound/soc/jz4740/jz4740-i2s.c b/sound/soc/jz4740/jz4740-i2s.c
index 794a3499e567..99394c036998 100644
--- a/sound/soc/jz4740/jz4740-i2s.c
+++ b/sound/soc/jz4740/jz4740-i2s.c
@@ -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,
-- 
2.13.2

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

* Applied "ASoC: mxs-saif: Handle return value of clk_prepare_enable/clk_prepare." to the asoc tree
  2017-07-25 10:14 ` [PATCH 06/11] ASoC: mxs-saif: Handle return value of clk_prepare_enable/clk_prepare Arvind Yadav
@ 2017-07-26 14:16     ` Mark Brown
  0 siblings, 0 replies; 34+ messages in thread
From: Mark Brown @ 2017-07-26 14:16 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: Mark Brown, perex, tiwai, broonie, krzk, sbkim73, lgirdwood,
	alsa-devel, linux-kernel, alsa-devel

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

>From 0d97ee867958a092f02e9cd7c865c278bcec18a6 Mon Sep 17 00:00:00 2001
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/mxs/mxs-saif.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index b42f301c6b96..156aa7c00787 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -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);
-- 
2.13.2

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

* Applied "ASoC: mxs-saif: Handle return value of clk_prepare_enable/clk_prepare." to the asoc tree
@ 2017-07-26 14:16     ` Mark Brown
  0 siblings, 0 replies; 34+ messages in thread
From: Mark Brown @ 2017-07-26 14:16 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: Mark Brown, perex, tiwai

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

>From 0d97ee867958a092f02e9cd7c865c278bcec18a6 Mon Sep 17 00:00:00 2001
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/mxs/mxs-saif.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index b42f301c6b96..156aa7c00787 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -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);
-- 
2.13.2

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

* Applied "ASoC: samsung: spdif: Handle return value of clk_prepare_enable." to the asoc tree
  2017-07-25 10:14 ` [PATCH 05/11] ASoC: samsung: spdif: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-07-26 14:17     ` Mark Brown
  2017-07-26 14:17     ` Mark Brown
  1 sibling, 0 replies; 34+ messages in thread
From: Mark Brown @ 2017-07-26 14:17 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: Mark Brown, perex, tiwai, broonie, krzk, sbkim73, lgirdwood,
	alsa-devel, linux-kernel, alsa-devel

The 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

>From 0f11daf10b4ac6a6c8ea6b39552f119c595b5406 Mon Sep 17 00:00:00 2001
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/samsung/spdif.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c
index 779504f54bc0..cb59911e65c0 100644
--- a/sound/soc/samsung/spdif.c
+++ b/sound/soc/samsung/spdif.c
@@ -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,
-- 
2.13.2

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

* Applied "ASoC: samsung: spdif: Handle return value of clk_prepare_enable." to the asoc tree
@ 2017-07-26 14:17     ` Mark Brown
  0 siblings, 0 replies; 34+ messages in thread
From: Mark Brown @ 2017-07-26 14:17 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: Mark Brown, perex, tiwai

The 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

>From 0f11daf10b4ac6a6c8ea6b39552f119c595b5406 Mon Sep 17 00:00:00 2001
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/samsung/spdif.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c
index 779504f54bc0..cb59911e65c0 100644
--- a/sound/soc/samsung/spdif.c
+++ b/sound/soc/samsung/spdif.c
@@ -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,
-- 
2.13.2

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

* Applied "ASoC: samsung: i2s: Handle return value of clk_prepare_enable." to the asoc tree
  2017-07-25 10:14 ` [PATCH 04/11] ASoC: samsung: i2s: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-07-26 14:17     ` Mark Brown
  2017-07-26 14:17     ` Mark Brown
  1 sibling, 0 replies; 34+ messages in thread
From: Mark Brown @ 2017-07-26 14:17 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: Mark Brown, perex, tiwai, broonie, krzk, sbkim73, lgirdwood,
	alsa-devel, linux-kernel, alsa-devel

The 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

>From f5c97c7b0438bec0aad9738af1baa698dae5bc09 Mon Sep 17 00:00:00 2001
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/samsung/i2s.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index c9f87f7bae99..daf7b892c967 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -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);
-- 
2.13.2

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

* Applied "ASoC: samsung: i2s: Handle return value of clk_prepare_enable." to the asoc tree
@ 2017-07-26 14:17     ` Mark Brown
  0 siblings, 0 replies; 34+ messages in thread
From: Mark Brown @ 2017-07-26 14:17 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: Mark Brown, perex, tiwai

The 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

>From f5c97c7b0438bec0aad9738af1baa698dae5bc09 Mon Sep 17 00:00:00 2001
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/samsung/i2s.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index c9f87f7bae99..daf7b892c967 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -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);
-- 
2.13.2

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

* Applied "ASoC: samsung: pcm: Handle return value of clk_prepare_enable." to the asoc tree
  2017-07-25 10:14 ` [PATCH 03/11] ASoC: samsung: pcm: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-07-26 14:17     ` Mark Brown
  2017-07-26 14:17     ` Mark Brown
  1 sibling, 0 replies; 34+ messages in thread
From: Mark Brown @ 2017-07-26 14:17 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: Mark Brown, perex, tiwai, broonie, krzk, sbkim73, lgirdwood,
	alsa-devel, linux-kernel, alsa-devel

The 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

>From a7ad9a88300c813a945793e9dae84ceaf7809141 Mon Sep 17 00:00:00 2001
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/samsung/pcm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c
index d50a6377c23d..37f95eee1558 100644
--- a/sound/soc/samsung/pcm.c
+++ b/sound/soc/samsung/pcm.c
@@ -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;
-- 
2.13.2

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

* Applied "ASoC: samsung: pcm: Handle return value of clk_prepare_enable." to the asoc tree
@ 2017-07-26 14:17     ` Mark Brown
  0 siblings, 0 replies; 34+ messages in thread
From: Mark Brown @ 2017-07-26 14:17 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: Mark Brown, perex, tiwai

The 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

>From a7ad9a88300c813a945793e9dae84ceaf7809141 Mon Sep 17 00:00:00 2001
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/samsung/pcm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c
index d50a6377c23d..37f95eee1558 100644
--- a/sound/soc/samsung/pcm.c
+++ b/sound/soc/samsung/pcm.c
@@ -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;
-- 
2.13.2

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

* Applied "ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable." to the asoc tree
  2017-07-25 10:14 ` [PATCH 02/11] ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-07-26 14:17     ` Mark Brown
  2017-07-26 14:17     ` Mark Brown
  1 sibling, 0 replies; 34+ messages in thread
From: Mark Brown @ 2017-07-26 14:17 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: Mark Brown, perex, tiwai, broonie, krzk, sbkim73, lgirdwood,
	alsa-devel, linux-kernel, alsa-devel

The 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

>From 8698475a94d0b7eb21efaa346d507dc4932f2032 Mon Sep 17 00:00:00 2001
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/samsung/s3c24xx-i2s.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c
index 91e6871e5413..8d58d02183bf 100644
--- a/sound/soc/samsung/s3c24xx-i2s.c
+++ b/sound/soc/samsung/s3c24xx-i2s.c
@@ -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);
-- 
2.13.2

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

* Applied "ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable." to the asoc tree
@ 2017-07-26 14:17     ` Mark Brown
  0 siblings, 0 replies; 34+ messages in thread
From: Mark Brown @ 2017-07-26 14:17 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: alsa-devel, sbkim73, linux-kernel, lgirdwood, krzk, tiwai, broonie

The 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

>From 8698475a94d0b7eb21efaa346d507dc4932f2032 Mon Sep 17 00:00:00 2001
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/samsung/s3c24xx-i2s.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c
index 91e6871e5413..8d58d02183bf 100644
--- a/sound/soc/samsung/s3c24xx-i2s.c
+++ b/sound/soc/samsung/s3c24xx-i2s.c
@@ -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);
-- 
2.13.2

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

* Applied "ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable." to the asoc tree
  2017-07-25 10:14 ` [PATCH 01/11] ASoC: samsung: s3c2412: " Arvind Yadav
@ 2017-07-26 14:17     ` Mark Brown
  2017-07-26 14:17     ` Mark Brown
  1 sibling, 0 replies; 34+ messages in thread
From: Mark Brown @ 2017-07-26 14:17 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: Mark Brown, perex, tiwai, broonie, krzk, sbkim73, lgirdwood,
	alsa-devel, linux-kernel, alsa-devel

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.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 d2d2c0a0f0e230e9650e778d0d5c7ed6d1bcffb0 Mon Sep 17 00:00:00 2001
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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 <arvind.yadav.cs@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/samsung/s3c2412-i2s.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
index 0a4718207e6e..bcd1cbdeac93 100644
--- a/sound/soc/samsung/s3c2412-i2s.c
+++ b/sound/soc/samsung/s3c2412-i2s.c
@@ -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;
 
-- 
2.13.2

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

* Applied "ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable." to the asoc tree
@ 2017-07-26 14:17     ` Mark Brown
  0 siblings, 0 replies; 34+ messages in thread
From: Mark Brown @ 2017-07-26 14:17 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: Mark Brown, perex, tiwai

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.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 d2d2c0a0f0e230e9650e778d0d5c7ed6d1bcffb0 Mon Sep 17 00:00:00 2001
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
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 <arvind.yadav.cs@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/samsung/s3c2412-i2s.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
index 0a4718207e6e..bcd1cbdeac93 100644
--- a/sound/soc/samsung/s3c2412-i2s.c
+++ b/sound/soc/samsung/s3c2412-i2s.c
@@ -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;
 
-- 
2.13.2

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

* Re: Applied "ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable." to the asoc tree
  2017-07-26 14:17     ` Mark Brown
  (?)
@ 2017-07-26 15:46     ` Krzysztof Kozlowski
  2017-07-26 16:07       ` Mark Brown
  -1 siblings, 1 reply; 34+ messages in thread
From: Krzysztof Kozlowski @ 2017-07-26 15:46 UTC (permalink / raw)
  To: Mark Brown
  Cc: Arvind Yadav, perex, tiwai, sbkim73, lgirdwood, alsa-devel, linux-kernel

On Wed, Jul 26, 2017 at 03:17:12PM +0100, Mark Brown wrote:
> 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.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 d2d2c0a0f0e230e9650e778d0d5c7ed6d1bcffb0 Mon Sep 17 00:00:00 2001
> From: Arvind Yadav <arvind.yadav.cs@gmail.com>
> 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 <arvind.yadav.cs@gmail.com>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>  sound/soc/samsung/s3c2412-i2s.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
> index 0a4718207e6e..bcd1cbdeac93 100644
> --- a/sound/soc/samsung/s3c2412-i2s.c
> +++ b/sound/soc/samsung/s3c2412-i2s.c
> @@ -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

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

* Re: Applied "ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable." to the asoc tree
  2017-07-26 15:46     ` Krzysztof Kozlowski
@ 2017-07-26 16:07       ` Mark Brown
  2017-07-26 16:13         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 34+ messages in thread
From: Mark Brown @ 2017-07-26 16:07 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Arvind Yadav, perex, tiwai, sbkim73, lgirdwood, alsa-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 370 bytes --]

On Wed, Jul 26, 2017 at 05:46:42PM +0200, Krzysztof Kozlowski wrote:

> 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...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: Applied "ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable." to the asoc tree
  2017-07-26 16:07       ` Mark Brown
@ 2017-07-26 16:13         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 34+ messages in thread
From: Krzysztof Kozlowski @ 2017-07-26 16:13 UTC (permalink / raw)
  To: Mark Brown
  Cc: Arvind Yadav, perex, tiwai, sbkim73, lgirdwood, alsa-devel, linux-kernel

On Wed, Jul 26, 2017 at 05:07:00PM +0100, Mark Brown wrote:
> On Wed, Jul 26, 2017 at 05:46:42PM +0200, Krzysztof Kozlowski wrote:
> 
> > 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

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

end of thread, other threads:[~2017-07-26 16:13 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-25 10:14 [PATCH 00/11] Handle return value of clk_prepare_enable Arvind Yadav
2017-07-25 10:14 ` [PATCH 01/11] ASoC: samsung: s3c2412: " Arvind Yadav
2017-07-25 17:43   ` Krzysztof Kozlowski
2017-07-25 17:43     ` Krzysztof Kozlowski
2017-07-26 14:17   ` Applied "ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable." to the asoc tree Mark Brown
2017-07-26 14:17     ` Mark Brown
2017-07-26 15:46     ` Krzysztof Kozlowski
2017-07-26 16:07       ` Mark Brown
2017-07-26 16:13         ` Krzysztof Kozlowski
2017-07-25 10:14 ` [PATCH 02/11] ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable Arvind Yadav
2017-07-25 17:50   ` Krzysztof Kozlowski
2017-07-25 17:50     ` Krzysztof Kozlowski
2017-07-26 14:17   ` Applied "ASoC: samsung: s3c24xx: Handle return value of clk_prepare_enable." to the asoc tree Mark Brown
2017-07-26 14:17     ` Mark Brown
2017-07-25 10:14 ` [PATCH 03/11] ASoC: samsung: pcm: Handle return value of clk_prepare_enable Arvind Yadav
2017-07-25 17:51   ` Krzysztof Kozlowski
2017-07-26 14:17   ` Applied "ASoC: samsung: pcm: Handle return value of clk_prepare_enable." to the asoc tree Mark Brown
2017-07-26 14:17     ` Mark Brown
2017-07-25 10:14 ` [PATCH 04/11] ASoC: samsung: i2s: Handle return value of clk_prepare_enable Arvind Yadav
2017-07-25 17:58   ` Krzysztof Kozlowski
2017-07-25 17:58     ` Krzysztof Kozlowski
2017-07-26 14:17   ` Applied "ASoC: samsung: i2s: Handle return value of clk_prepare_enable." to the asoc tree Mark Brown
2017-07-26 14:17     ` Mark Brown
2017-07-25 10:14 ` [PATCH 05/11] ASoC: samsung: spdif: Handle return value of clk_prepare_enable Arvind Yadav
2017-07-25 18:01   ` Krzysztof Kozlowski
2017-07-25 18:01     ` Krzysztof Kozlowski
2017-07-26 14:17   ` Applied "ASoC: samsung: spdif: Handle return value of clk_prepare_enable." to the asoc tree Mark Brown
2017-07-26 14:17     ` Mark Brown
2017-07-25 10:14 ` [PATCH 06/11] ASoC: mxs-saif: Handle return value of clk_prepare_enable/clk_prepare Arvind Yadav
2017-07-26 14:16   ` Applied "ASoC: mxs-saif: Handle return value of clk_prepare_enable/clk_prepare." to the asoc tree Mark Brown
2017-07-26 14:16     ` Mark Brown
2017-07-25 10:14 ` [PATCH 07/11] ASoC: jz4740: Handle return value of clk_prepare_enable Arvind Yadav
2017-07-26 14:16   ` Applied "ASoC: jz4740: Handle return value of clk_prepare_enable." to the asoc tree Mark Brown
2017-07-26 14:16     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.