2022-03-07 09:33:09

by Miaoqian Lin

[permalink] [raw]
Subject: [PATCH] ASoC: rk817: Fix missing clk_disable_unprepare() in rk817_platform_probe

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 <[email protected]>
---
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


2022-03-08 23:28:56

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] ASoC: rk817: Fix missing clk_disable_unprepare() in rk817_platform_probe

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

2022-03-09 01:08:44

by Chris Morgan

[permalink] [raw]
Subject: Re: [PATCH] ASoC: rk817: Fix missing clk_disable_unprepare() in rk817_platform_probe

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 <[email protected]>

> Signed-off-by: Miaoqian Lin <[email protected]>
> ---
> 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
>