summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorLuo Meng <luomeng12@huawei.com>2020-11-23 16:38:39 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-11 15:23:32 +0300
commitaf699e99efdc748d174f3ad6f9790770ae3f5529 (patch)
tree354fe95c0d2a8e25be653d52b23b0ae4327ba68b /sound
parentfdc1416c21992ea7b4737123c8aa8c7424a1a540 (diff)
downloadlinux-af699e99efdc748d174f3ad6f9790770ae3f5529.tar.xz
ASoC: wm_adsp: fix error return code in wm_adsp_load()
commit 3fba05a2832f93b4d0cd4204f771fdae0d823114 upstream. 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@huawei.com> Signed-off-by: Luo Meng <luomeng12@huawei.com> Acked-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20201123133839.4073787-1-luomeng12@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm_adsp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 9b8bb7bbe945..4c56b782500d 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -1912,6 +1912,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;
}