]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: rk817: Fix missing clk_disable_unprepare() in rk817_platform_probe
authorMiaoqian Lin <linmq006@gmail.com>
Mon, 7 Mar 2022 09:01:30 +0000 (09:01 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 8 Mar 2022 12:32:01 +0000 (12:32 +0000)
Fix the missing clk_disable_unprepare() before return
from rk817_platform_probe() in the error handling case.

Fixes: 2bbd13c02eb8 ("ASoC: Add Rockchip rk817 audio CODEC support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Tested-by: Chris Morgan <macromorgan@hotmail.com>
Link: https://lore.kernel.org/r/20220307090146.4104-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rk817_codec.c

index 03f24edfe4f6492b86fe8fc97a3ae362b6083e50..8fffe378618d0ec3f946e3d3985c3d2887638aae 100644 (file)
@@ -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;
 }