Skip to content

Commit

Permalink
ASoC: rockchip: spdif: Add missing clk_disable_unprepare() in rk_spdi…
Browse files Browse the repository at this point in the history
…f_runtime_resume()

rk_spdif_runtime_resume() may have called clk_prepare_enable() before return
from failed branches, add missing clk_disable_unprepare() in this case.

Fixes: f874b80 ("ASoC: rockchip: Add rockchip SPDIF transceiver driver")
Signed-off-by: Wang Jingjin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Wang Jingjin authored and broonie committed Dec 12, 2022
1 parent 9529dc1 commit 6d94d00
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/soc/rockchip/rockchip_spdif.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ static int __maybe_unused rk_spdif_runtime_resume(struct device *dev)

ret = clk_prepare_enable(spdif->hclk);
if (ret) {
clk_disable_unprepare(spdif->mclk);
dev_err(spdif->dev, "hclk clock enable failed %d\n", ret);
return ret;
}
Expand Down

0 comments on commit 6d94d00

Please sign in to comment.