diff mbox series

ASoC: rockchip: spdif: Add missing clk_disable_unprepare() in rockchip_pdm_runtime_resume()

Message ID 20221205024317.2422223-1-wangjingjin1@huawei.com (mailing list archive)
State New, archived
Headers show
Series ASoC: rockchip: spdif: Add missing clk_disable_unprepare() in rockchip_pdm_runtime_resume() | expand

Commit Message

Wang Jingjin Dec. 5, 2022, 2:43 a.m. UTC
The clk_disable_unprepare() should be called in the error handling of
rockchip_pdm_runtime_resume().

Fixes: fc05a5b22253 ("ASoC: rockchip: add support for pdm controller")
Signed-off-by: Wang Jingjin <wangjingjin1@huawei.com>
---
 sound/soc/rockchip/rockchip_pdm.c | 1 +
 1 file changed, 1 insertion(+)

--
2.25.1

Comments

Mark Brown Dec. 7, 2022, 1:58 p.m. UTC | #1
On Mon, Dec 05, 2022 at 10:43:17AM +0800, Wang Jingjin wrote:
> The clk_disable_unprepare() should be called in the error handling of
> rockchip_pdm_runtime_resume().
> 
> Fixes: fc05a5b22253 ("ASoC: rockchip: add support for pdm controller")
> Signed-off-by: Wang Jingjin <wangjingjin1@huawei.com>
> ---
>  sound/soc/rockchip/rockchip_pdm.c | 1 +
>  1 file changed, 1 insertion(+)

The subject line says this is a fix for the S/PDIF driver but the patch
is for the PDM driver and I see you sent a separate fix for the PDM
driver.
Wang Jingjin Dec. 8, 2022, 6:10 a.m. UTC | #2
Right,will fix in v2
Thanks for review.

在 2022/12/7 21:58, Mark Brown 写道:
> On Mon, Dec 05, 2022 at 10:43:17AM +0800, Wang Jingjin wrote:
>> The clk_disable_unprepare() should be called in the error handling of
>> rockchip_pdm_runtime_resume().
>>
>> Fixes: fc05a5b22253 ("ASoC: rockchip: add support for pdm controller")
>> Signed-off-by: Wang Jingjin <wangjingjin1@huawei.com>
>> ---
>>   sound/soc/rockchip/rockchip_pdm.c | 1 +
>>   1 file changed, 1 insertion(+)
> 
> The subject line says this is a fix for the S/PDIF driver but the patch
> is for the PDM driver and I see you sent a separate fix for the PDM
> driver.
diff mbox series

Patch

diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c
index a7549f827235..5b1e47bdc376 100644
--- a/sound/soc/rockchip/rockchip_pdm.c
+++ b/sound/soc/rockchip/rockchip_pdm.c
@@ -431,6 +431,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;
 	}