[PATCH 2/6] ASoC: sunxi: sun4i-codec: Drop redundant error messages
From: phucduc . bui
Date: Wed Jul 15 2026 - 05:57:49 EST
From: bui duc phuc <phucduc.bui@xxxxxxxxx>
The called functions already log failures where appropriate. Return the
original error directly and avoid duplicate error messages.
Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
sound/soc/sunxi/sun4i-codec.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index 05308df3ae5b..71f7a1fedd88 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -2380,31 +2380,22 @@ static int sun4i_codec_probe(struct platform_device *pdev)
ret = devm_snd_soc_register_component(&pdev->dev, quirks->codec,
&sun4i_codec_dai, 1);
- if (ret) {
- dev_err(&pdev->dev, "Failed to register our codec\n");
+ if (ret)
return ret;
- }
ret = devm_snd_soc_register_component(&pdev->dev,
&sun4i_codec_component,
&dummy_cpu_dai, 1);
- if (ret) {
- dev_err(&pdev->dev, "Failed to register our DAI\n");
+ if (ret)
return ret;
- }
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
- if (ret) {
- dev_err(&pdev->dev, "Failed to register against DMAEngine\n");
+ if (ret)
return ret;
- }
card = quirks->create_card(&pdev->dev);
- if (IS_ERR(card)) {
- ret = PTR_ERR(card);
- dev_err(&pdev->dev, "Failed to create our card\n");
- return ret;
- }
+ if (IS_ERR(card))
+ return PTR_ERR(card);
snd_soc_card_set_drvdata(card, scodec);
--
2.43.0