mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 13:37:36 +02:00
ASoC: msm8916-wcd-digital: Check failure for devm_snd_soc_register_component
[ Upstream commite927b05f3c] devm_snd_soc_register_component() may fails, we should check the error and do the corresponding error handling. Fixes:150db8c5af("ASoC: codecs: Add msm8916-wcd digital codec") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Link: https://lore.kernel.org/r/20220403115239.30140-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:
parent
608fc58858
commit
b6f474cd30
|
|
@ -1206,9 +1206,16 @@ static int msm8916_wcd_digital_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
dev_set_drvdata(dev, priv);
|
dev_set_drvdata(dev, priv);
|
||||||
|
|
||||||
return devm_snd_soc_register_component(dev, &msm8916_wcd_digital,
|
ret = devm_snd_soc_register_component(dev, &msm8916_wcd_digital,
|
||||||
msm8916_wcd_digital_dai,
|
msm8916_wcd_digital_dai,
|
||||||
ARRAY_SIZE(msm8916_wcd_digital_dai));
|
ARRAY_SIZE(msm8916_wcd_digital_dai));
|
||||||
|
if (ret)
|
||||||
|
goto err_mclk;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
err_mclk:
|
||||||
|
clk_disable_unprepare(priv->mclk);
|
||||||
err_clk:
|
err_clk:
|
||||||
clk_disable_unprepare(priv->ahbclk);
|
clk_disable_unprepare(priv->ahbclk);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user