[PATCH 1/2] ASoC: fsl: lpc3xxx-i2s: Simplify error handling

From: phucduc . bui

Date: Wed Nov 18 2026 - 05:08:25 EST


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

Return -EBUSY directly when the I2S channel is already in use.

Also remove the redundant error pointer from the regmap initialization
error message, as dev_err_probe() already reports the error.

Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
sound/soc/fsl/lpc3xxx-i2s.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/fsl/lpc3xxx-i2s.c b/sound/soc/fsl/lpc3xxx-i2s.c
index 757e0619d368..75bd148c1432 100644
--- a/sound/soc/fsl/lpc3xxx-i2s.c
+++ b/sound/soc/fsl/lpc3xxx-i2s.c
@@ -82,8 +82,7 @@ static int lpc3xxx_i2s_startup(struct snd_pcm_substream *substream, struct snd_s

if (flag & i2s_info_p->streams_in_use) {
dev_warn(dev, "I2S channel is busy\n");
- ret = -EBUSY;
- return ret;
+ return -EBUSY;
}

if (i2s_info_p->streams_in_use == 0) {
@@ -320,7 +319,7 @@ static int lpc32xx_i2s_probe(struct platform_device *pdev)
i2s_info_p->regs = devm_regmap_init_mmio(dev, iomem, &lpc32xx_i2s_regconfig);
if (IS_ERR(i2s_info_p->regs))
return dev_err_probe(dev, PTR_ERR(i2s_info_p->regs),
- "failed to init register map: %pe\n", i2s_info_p->regs);
+ "failed to init register map\n");

i2s_info_p->clk = devm_clk_get(dev, NULL);
if (IS_ERR(i2s_info_p->clk))
--
2.43.0