Skip to contentSkip to conversation

ASoC: wm_adsp: fix error return code in wm_adsp_load()

PATCH In review Luo Meng 3 participants 3 messages Nov 24, 2020 – Nov 25, 2020

Subsystems (3)
lore
Share & tools
lore

Luo Meng

author
#0 lore raw

PATCH 1/1 ASoC: wm_adsp: fix error return code in wm_adsp_load()

Fix to return a negative error code from the error handling case instead of 0 in function wm_adsp_load(), as done elsewhere in this function.

Fixes 170b1e123f38 ("ASoC: wm_adsp: Add support for new Halo core DSPs")
---
 sound/soc/codecs/wm_adsp.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/codecs/wm_adsp.c +1 -0
index bcf18bf15a02..e61d00486c65 100644
@@ -1937,6 +1937,7 @@ static int wm_adsp_load(struct wm_adsp *dsp)
 			mem = wm_adsp_find_region(dsp, type);
 			if (!mem) {
 				adsp_err(dsp, "No region of type: %x\n", type);
+				ret = -EINVAL;
 				goto out_fw;
 			}
 
Signature · 1 line
2.25.4
Acked-by on v1 1/1
#1 lore raw
Quoted 17 lines · Luo Meng

Fix to return a negative error code from the error handling case instead of 0 in function wm_adsp_load(), as done elsewhere in this function.

Fixes 170b1e123f38 ("ASoC: wm_adsp: Add support for new Halo core DSPs")
---
  sound/soc/codecs/wm_adsp.c | 1 +
  1 file changed, 1 insertion(+)
sound/soc/codecs/wm_adsp.c +0 -0
index bcf18bf15a02..e61d00486c65 100644

sound/soc/codecs/wm_adsp.c static int wm_adsp_load(struct wm_adsp *dsp) · line 1943

Quoted 7 lines
sound/soc/codecs/wm_adsp.c +1 -0
@@ -1937,6 +1937,7 @@ static int wm_adsp_load(struct wm_adsp *dsp)
  			mem = wm_adsp_find_region(dsp, type);
  			if (!mem) {
  				adsp_err(dsp, "No region of type: %x\n", type);
+				ret = -EINVAL;
  				goto out_fw;
  			}
 
maintainer
#2 lore raw
In reply to Luo Meng
Quoted 3 lines · Luo Meng

Fix to return a negative error code from the error handling case instead of 0 in function wm_adsp_load(), as done elsewhere in this function.

Applied to

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

Thanks!

[1/1] ASoC: wm_adsp: fix error return code in wm_adsp_load()

      commit: 3fba05a2832f93b4d0cd4204f771fdae0d823114

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