aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2016-11-22 10:38:34 -0500
committerMark Brown <broonie@kernel.org>2016-11-22 13:41:33 -0500
commit48c2c99359044763b0cf21e59405638f9630fe06 (patch)
tree5888d8333296564a2b0f259f20076359163b135e
parent1db51e6fb0f5596518975fd1b2f7ef050e9d58ef (diff)
ASoC: wm_adsp: Check return value from wm_adsp_buffer_init
We are not checking the return value from a call to wm_adsp_buffer_init it looks like this used to be returned at the bottom of the function but probably got missed when more error paths were added. This patch adds the appropriate error check. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/wm_adsp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 6e6b9d838332..ff111a82fa3f 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -2575,8 +2575,13 @@ int wm_adsp2_event(struct snd_soc_dapm_widget *w,
2575 2575
2576 mutex_lock(&dsp->pwr_lock); 2576 mutex_lock(&dsp->pwr_lock);
2577 2577
2578 if (wm_adsp_fw[dsp->fw].num_caps != 0) 2578 if (wm_adsp_fw[dsp->fw].num_caps != 0) {
2579 ret = wm_adsp_buffer_init(dsp); 2579 ret = wm_adsp_buffer_init(dsp);
2580 if (ret < 0) {
2581 mutex_unlock(&dsp->pwr_lock);
2582 goto err;
2583 }
2584 }
2580 2585
2581 mutex_unlock(&dsp->pwr_lock); 2586 mutex_unlock(&dsp->pwr_lock);
2582 2587