public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: rk817: Fix missing clk_disable_unprepare() in rk817_platform_probe
@ 2022-03-07  9:01 Miaoqian Lin
  2022-03-08  2:16 ` Chris Morgan
  2022-03-08 17:21 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Miaoqian Lin @ 2022-03-07  9:01 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Lee Jones, Chris Morgan, Jiapeng Chong, Wei Yongjun, Miaoqian Lin,
	Nicolas Frattaroli, Colin Ian King, alsa-devel, linux-kernel

Fix the missing clk_disable_unprepare() before return
from rk817_platform_probe() in the error handling case.

Fixes: 0d6a04da9b25 ("ASoC: Add Rockchip rk817 audio CODEC support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 sound/soc/codecs/rk817_codec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/rk817_codec.c b/sound/soc/codecs/rk817_codec.c
index 03f24edfe4f6..8fffe378618d 100644
--- a/sound/soc/codecs/rk817_codec.c
+++ b/sound/soc/codecs/rk817_codec.c
@@ -508,12 +508,14 @@ static int rk817_platform_probe(struct platform_device *pdev)
 	if (ret < 0) {
 		dev_err(&pdev->dev, "%s() register codec error %d\n",
 			__func__, ret);
-		goto err_;
+		goto err_clk;
 	}
 
 	return 0;
-err_:
 
+err_clk:
+	clk_disable_unprepare(rk817_codec_data->mclk);
+err_:
 	return ret;
 }
 
-- 
2.17.1


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

* Re: [PATCH] ASoC: rk817: Fix missing clk_disable_unprepare() in rk817_platform_probe
  2022-03-07  9:01 [PATCH] ASoC: rk817: Fix missing clk_disable_unprepare() in rk817_platform_probe Miaoqian Lin
@ 2022-03-08  2:16 ` Chris Morgan
  2022-03-08 17:21 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Chris Morgan @ 2022-03-08  2:16 UTC (permalink / raw)
  To: Miaoqian Lin
  Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Lee Jones, Jiapeng Chong, Wei Yongjun, Nicolas Frattaroli,
	Colin Ian King, alsa-devel, linux-kernel

On Mon, Mar 07, 2022 at 09:01:30AM +0000, Miaoqian Lin wrote:
> Fix the missing clk_disable_unprepare() before return
> from rk817_platform_probe() in the error handling case.
> 
> Fixes: 0d6a04da9b25 ("ASoC: Add Rockchip rk817 audio CODEC support")

Tested-by: Chris Morgan <macromorgan@hotmail.com>

> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
>  sound/soc/codecs/rk817_codec.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/codecs/rk817_codec.c b/sound/soc/codecs/rk817_codec.c
> index 03f24edfe4f6..8fffe378618d 100644
> --- a/sound/soc/codecs/rk817_codec.c
> +++ b/sound/soc/codecs/rk817_codec.c
> @@ -508,12 +508,14 @@ static int rk817_platform_probe(struct platform_device *pdev)
>  	if (ret < 0) {
>  		dev_err(&pdev->dev, "%s() register codec error %d\n",
>  			__func__, ret);
> -		goto err_;
> +		goto err_clk;
>  	}
>  
>  	return 0;
> -err_:
>  
> +err_clk:
> +	clk_disable_unprepare(rk817_codec_data->mclk);
> +err_:
>  	return ret;
>  }
>  
> -- 
> 2.17.1
> 

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

* Re: [PATCH] ASoC: rk817: Fix missing clk_disable_unprepare() in rk817_platform_probe
  2022-03-07  9:01 [PATCH] ASoC: rk817: Fix missing clk_disable_unprepare() in rk817_platform_probe Miaoqian Lin
  2022-03-08  2:16 ` Chris Morgan
@ 2022-03-08 17:21 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-03-08 17:21 UTC (permalink / raw)
  To: Jaroslav Kysela, Jiapeng Chong, alsa-devel, Miaoqian Lin,
	Lee Jones, Chris Morgan, Takashi Iwai, linux-kernel,
	Liam Girdwood, Wei Yongjun, Nicolas Frattaroli, Colin Ian King

On Mon, 7 Mar 2022 09:01:30 +0000, Miaoqian Lin wrote:
> Fix the missing clk_disable_unprepare() before return
> from rk817_platform_probe() in the error handling case.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: rk817: Fix missing clk_disable_unprepare() in rk817_platform_probe
      commit: a6b44a2518a08348bd0f0401e4d2b99233bbabc2

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

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

end of thread, other threads:[~2022-03-08 17:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-07  9:01 [PATCH] ASoC: rk817: Fix missing clk_disable_unprepare() in rk817_platform_probe Miaoqian Lin
2022-03-08  2:16 ` Chris Morgan
2022-03-08 17:21 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox