Skip to contentSkip to conversation

ASoC: msm8916-wcd-digital: Check failure for devm_snd_soc_register_component

PATCH In review Miaoqian Lin 2 participants 2 messages Apr 3, 2022 – Apr 6, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: msm8916-wcd-digital: Check failure for devm_snd_soc_register_component

devm_snd_soc_register_component() may fails, we should check the error and do the corresponding error handling.

Fixes 150db8c5afa1 ("ASoC: codecs: Add msm8916-wcd digital codec")
---
 sound/soc/codecs/msm8916-wcd-digital.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
sound/soc/codecs/msm8916-wcd-digital.c +8 -1
index 9ad7fc0baf07..20a07c92b2fc 100644
@@ -1206,9 +1206,16 @@ static int msm8916_wcd_digital_probe(struct platform_device *pdev)
 
 	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,
 				      ARRAY_SIZE(msm8916_wcd_digital_dai));
+	if (ret)
+		goto err_mclk;
+
+	return 0;
+
+err_mclk:
+	clk_disable_unprepare(priv->mclk);
 err_clk:
 	clk_disable_unprepare(priv->ahbclk);
 	return ret;
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 4 lines · Miaoqian Lin

devm_snd_soc_register_component() may fails, we should check the error and do the corresponding error handling.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: msm8916-wcd-digital: Check failure for devm_snd_soc_register_component

      commit: e927b05f3cc20de87f6b7d912a5bbe556931caca

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark