diff mbox series

ASoC: rk817: Fix missing clk_disable_unprepare() in rk817_platform_probe

Message ID 20220307090146.4104-1-linmq006@gmail.com (mailing list archive)
State Accepted
Commit a6b44a2518a08348bd0f0401e4d2b99233bbabc2
Headers show
Series ASoC: rk817: Fix missing clk_disable_unprepare() in rk817_platform_probe | expand

Commit Message

Miaoqian Lin March 7, 2022, 9:01 a.m. UTC
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(-)

Comments

Chris Morgan March 8, 2022, 2:16 a.m. UTC | #1
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
>
Mark Brown March 8, 2022, 5:21 p.m. UTC | #2
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
diff mbox series

Patch

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;
 }