ASoC: rockchip: i2s: Fix missing clk_disable_unprepare() in rockchip_i2s_probe
[ Upstream commit f725d20579807a68afbe5dba69e78b8fa05f5ef0 ]
Fix the missing clk_disable_unprepare() before return
from rockchip_i2s_probe() in the error handling case.
Fixes: 01605ad128
("ASoC: rockchip-i2s: enable "hclk" for rockchip I2S controller")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220307083553.26009-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
7e8b0fd0eb
commit
0d82401d46
@@ -624,19 +624,23 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
|
||||
i2s->mclk = devm_clk_get(&pdev->dev, "i2s_clk");
|
||||
if (IS_ERR(i2s->mclk)) {
|
||||
dev_err(&pdev->dev, "Can't retrieve i2s master clock\n");
|
||||
return PTR_ERR(i2s->mclk);
|
||||
ret = PTR_ERR(i2s->mclk);
|
||||
goto err_clk;
|
||||
}
|
||||
|
||||
regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
|
||||
if (IS_ERR(regs))
|
||||
return PTR_ERR(regs);
|
||||
if (IS_ERR(regs)) {
|
||||
ret = PTR_ERR(regs);
|
||||
goto err_clk;
|
||||
}
|
||||
|
||||
i2s->regmap = devm_regmap_init_mmio(&pdev->dev, regs,
|
||||
&rockchip_i2s_regmap_config);
|
||||
if (IS_ERR(i2s->regmap)) {
|
||||
dev_err(&pdev->dev,
|
||||
"Failed to initialise managed register map\n");
|
||||
return PTR_ERR(i2s->regmap);
|
||||
ret = PTR_ERR(i2s->regmap);
|
||||
goto err_clk;
|
||||
}
|
||||
|
||||
i2s->playback_dma_data.addr = res->start + I2S_TXDR;
|
||||
@@ -695,7 +699,8 @@ err_suspend:
|
||||
i2s_runtime_suspend(&pdev->dev);
|
||||
err_pm_disable:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
err_clk:
|
||||
clk_disable_unprepare(i2s->hclk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user