Skip to contentSkip to conversation

ASoC: wm_adsp: Release firmware on memory allocation failure

PATCH In review Dimitris Papastamos 2 participants 2 messages Oct 30, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: wm_adsp: Release firmware on memory allocation failure

---
 sound/soc/codecs/wm_adsp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/codecs/wm_adsp.c +2 -1
index b3fbe4a..a2144b0 100644
@@ -630,7 +630,8 @@ static int wm_adsp_load(struct wm_adsp *dsp)
 				      GFP_KERNEL | GFP_DMA);
 			if (!buf) {
 				adsp_err(dsp, "Out of memory\n");
-				return -ENOMEM;
+				ret = -ENOMEM;
+				goto out_fw;
 			}
 
 			ret = regmap_raw_write(regmap, reg, buf,
Signature · 1 line
1.8.4.2