Skip to content

Commit

Permalink
ASoC: msm8916-wcd-digital: Fix missing clk_disable_unprepare() in msm…
Browse files Browse the repository at this point in the history
…8916_wcd_digital_probe

Fix the missing clk_disable_unprepare() before return
from msm8916_wcd_digital_probe in the error handling case.

Fixes: 150db8c ("ASoC: codecs: Add msm8916-wcd digital codec")
Signed-off-by: Miaoqian Lin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Yuuoniy authored and broonie committed Mar 11, 2022
1 parent 5bbe291 commit 375a347
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sound/soc/codecs/msm8916-wcd-digital.c
Original file line number Diff line number Diff line change
Expand Up @@ -1201,14 +1201,17 @@ static int msm8916_wcd_digital_probe(struct platform_device *pdev)
ret = clk_prepare_enable(priv->mclk);
if (ret < 0) {
dev_err(dev, "failed to enable mclk %d\n", ret);
return ret;
goto err_clk;
}

dev_set_drvdata(dev, priv);

return devm_snd_soc_register_component(dev, &msm8916_wcd_digital,
msm8916_wcd_digital_dai,
ARRAY_SIZE(msm8916_wcd_digital_dai));
err_clk:
clk_disable_unprepare(priv->ahbclk);
return ret;
}

static int msm8916_wcd_digital_remove(struct platform_device *pdev)
Expand Down

0 comments on commit 375a347

Please sign in to comment.