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>
This commit is contained in:
Dimitris Papastamos 2013-11-01 15:56:53 +00:00 committed by Mark Brown
parent 43bc3bf64b
commit 7328823d00
1 changed files with 2 additions and 1 deletions

View File

@ -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,