]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
ASoC: wm_adsp: Release firmware on memory allocation failure
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Fri, 1 Nov 2013 15:56:53 +0000 (15:56 +0000)
committerMark Brown <broonie@linaro.org>
Fri, 1 Nov 2013 17:48:35 +0000 (10:48 -0700)
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/wm_adsp.c

index 076da025ba84a6d23623ceb12ba00dee747f36c0..4008ceb77c5b1ad23718f93761f7a831d3ebe726 100644 (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,