]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: rockchip: pdm: Add missing clk_disable_unprepare() in rockchip_pdm_runtime_resume()
authorWang Jingjin <wangjingjin1@huawei.com>
Mon, 5 Dec 2022 03:28:02 +0000 (11:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:40 +0000 (11:41 +0100)
[ Upstream commit fcb26bf630487a96bc6c63c8ac65982e5f0cd743 ]

The clk_disable_unprepare() should be called in the error handling of
rockchip_pdm_runtime_resume().

Fixes: 1c00f372c07a ("ASoC: rockchip: add support for pdm controller")
Signed-off-by: Wang Jingjin <wangjingjin1@huawei.com>
Link: https://lore.kernel.org/r/20221205032802.2422983-1-wangjingjin1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/rockchip/rockchip_pdm.c

index 1707414cfa9213c6ebd244c98550666dbff75330..9f6cbaf3c0e97e2b6dcf1f627f23d81ec7263249 100644 (file)
@@ -368,6 +368,7 @@ static int rockchip_pdm_runtime_resume(struct device *dev)
 
        ret = clk_prepare_enable(pdm->hclk);
        if (ret) {
+               clk_disable_unprepare(pdm->clk);
                dev_err(pdm->dev, "hclock enable failed %d\n", ret);
                return ret;
        }