[PATCH] ASoC: wm_adsp: fix error return code in wm_adsp_load()
Luo Meng
luomeng12 at huawei.com
Mon Nov 23 14:38:39 CET 2020
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")
Reported-by: Hulk Robot <hulkci at huawei.com>
Signed-off-by: Luo Meng <luomeng12 at huawei.com>
---
sound/soc/codecs/wm_adsp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index bcf18bf15a02..e61d00486c65 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -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;
}
--
2.25.4
More information about the Alsa-devel
mailing list