[PATCH v2 6/6] ASoC: dwc: Remove redundant error messages

From: phucduc . bui

Date: Tue Nov 10 2026 - 05:07:41 EST


From: bui duc phuc <phucduc.bui@xxxxxxxxx>

The underlying functions already report these errors deeper in
the call chain, making the additional dev_err_probe() and
dev_err() calls unnecessary.

Also fix the indentation of the affected code and correct a typo
in the DAI format error message.

Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---

Changes in v2:
- Add the indentation and typo fixes to this commit.

sound/soc/dwc/dwc-i2s.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c
index 0d2be2d8d31a..d09cf1cd07f4 100644
--- a/sound/soc/dwc/dwc-i2s.c
+++ b/sound/soc/dwc/dwc-i2s.c
@@ -331,7 +331,7 @@ static int dw_i2s_hw_params(struct snd_pcm_substream *substream,
}
} else {
u32 bitclk = config->sample_rate *
- config->data_width * 2;
+ config->data_width * 2;
if (dev->tdm_slots)
bitclk = config->sample_rate *
config->data_width * dev->tdm_slots;
@@ -417,7 +417,7 @@ static int dw_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
dev->frame_offset = 0;
break;
default:
- dev_err(dev->dev, "DAI format unsupported");
+ dev_err(dev->dev, "DAI format unsupported\n");
return -EINVAL;
}

@@ -752,7 +752,7 @@ static int jh7110_i2s_crg_master_init(struct dw_i2s_dev *dev)

ret = clk_bulk_get(dev->dev, ARRAY_SIZE(clks), clks);
if (ret)
- return dev_err_probe(dev->dev, ret, "failed to get i2s clocks\n");
+ return ret;

mclk = clks[0].clk;
mclk_ext = clks[1].clk;
@@ -830,7 +830,7 @@ static int jh7110_i2s_crg_slave_init(struct dw_i2s_dev *dev)

ret = clk_bulk_get(dev->dev, ARRAY_SIZE(clks), clks);
if (ret)
- return dev_err_probe(dev->dev, ret, "failed to get i2s clocks\n");
+ return ret;

mclk = clks[0].clk;
mclk_ext = clks[1].clk;
@@ -966,10 +966,8 @@ static int dw_i2s_probe(struct platform_device *pdev)
if (irq > 0) {
ret = devm_request_irq(&pdev->dev, irq, i2s_irq_handler, 0,
pdev->name, dev);
- if (ret < 0) {
- dev_err(&pdev->dev, "failed to request irq\n");
+ if (ret < 0)
goto err_assert_reset;
- }
}

dev->i2s_reg_comp1 = I2S_COMP_PARAM_1;
@@ -1010,10 +1008,8 @@ static int dw_i2s_probe(struct platform_device *pdev)
dev_set_drvdata(&pdev->dev, dev);
ret = devm_snd_soc_register_component(&pdev->dev, &dw_i2s_component,
dw_i2s_dai, 1);
- if (ret != 0) {
- dev_err(&pdev->dev, "not able to register dai\n");
+ if (ret)
goto err_assert_reset;
- }

if (!pdata || dev->is_jh7110) {
if (irq >= 0) {
--
2.43.0