Skip to content

Commit 8ba08d3

Browse files
Yuuoniybroonie
authored andcommitted
ASoC: rk817: Use devm_clk_get() in rk817_platform_probe
We need to call clk_put() to undo clk_get() in the error path. Use devm_clk_get() to obtain a reference to the clock, It has the benefit that clk_put() is no longer required. Fixes: 0d6a04d ("ASoC: Add Rockchip rk817 audio CODEC support") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Link: https://lore.kernel.org/r/20220404090753.17940-1-linmq006@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 0b3d5d2 commit 8ba08d3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/soc/codecs/rk817_codec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ static int rk817_platform_probe(struct platform_device *pdev)
489489

490490
rk817_codec_parse_dt_property(&pdev->dev, rk817_codec_data);
491491

492-
rk817_codec_data->mclk = clk_get(pdev->dev.parent, "mclk");
492+
rk817_codec_data->mclk = devm_clk_get(pdev->dev.parent, "mclk");
493493
if (IS_ERR(rk817_codec_data->mclk)) {
494494
dev_dbg(&pdev->dev, "Unable to get mclk\n");
495495
ret = -ENXIO;

0 commit comments

Comments
 (0)