summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm_adsp.c
diff options
context:
space:
mode:
authorDimitris Papastamos2013-11-01 16:56:53 +0100
committerMark Brown2013-11-01 18:48:35 +0100
commit7328823d0052bbdb15af162f9f510ced811bdfe8 (patch)
tree9fb48c56da5ef11a1de1130db68fafff66e92aa7 /sound/soc/codecs/wm_adsp.c
parentASoC: wm_adsp: Print error when regmap reads/writes fail (diff)
downloadkernel-qcow2-linux-7328823d0052bbdb15af162f9f510ced811bdfe8.tar.gz
kernel-qcow2-linux-7328823d0052bbdb15af162f9f510ced811bdfe8.tar.xz
kernel-qcow2-linux-7328823d0052bbdb15af162f9f510ced811bdfe8.zip
ASoC: wm_adsp: Release firmware on memory allocation failure
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/wm_adsp.c')
-rw-r--r--sound/soc/codecs/wm_adsp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 076da025ba84..4008ceb77c5b 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -689,7 +689,8 @@ static int wm_adsp_load(struct wm_adsp *dsp)
&buf_list);
if (!buf) {
adsp_err(dsp, "Out of memory\n");
- return -ENOMEM;
+ ret = -ENOMEM;
+ goto out_fw;
}
ret = regmap_raw_write_async(regmap, reg, buf->buf,