2024-04-15 10:34:51

by Dan Carpenter

[permalink] [raw]
Subject: [PATCH] ASoC: cs35l41: Fix error code in cs35l41_dsp_init()

Set the error code on this error path. Don't return success.

Fixes: eefb831d2e4d ("ASoC: cs35l41: Update DSP1RX5/6 Sources for DSP config")
Signed-off-by: Dan Carpenter <[email protected]>
---
sound/soc/codecs/cs35l41.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/cs35l41.c b/sound/soc/codecs/cs35l41.c
index f8e57a2fc3e3..2799ccd6b5c7 100644
--- a/sound/soc/codecs/cs35l41.c
+++ b/sound/soc/codecs/cs35l41.c
@@ -1126,6 +1126,7 @@ static int cs35l41_dsp_init(struct cs35l41_private *cs35l41)
default:
dev_err(cs35l41->dev, "wm_halo_init failed - Invalid Boost Type: %d\n",
cs35l41->hw_cfg.bst_type);
+ ret = -EINVAL;
goto err_dsp;
}

--
2.43.0