Skip to contentSkip to conversation

ASoC: wm_adsp: Release firmware on error

PATCH In review Charles Keepax 2 participants 2 messages Jan 21, 2013 – Jan 22, 2013

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

PATCH 1/1 ASoC: wm_adsp: Release firmware on error

This patch correctly releases the firmware if the magic string in the firmware header does not match.

Change-Id I2d08f7fff92b2f0e0f2ab1fb937007e3783f815e
---
 sound/soc/codecs/wm_adsp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/codecs/wm_adsp.c +1 -1
index 4196f2d..b6b6548 100644
@@ -396,7 +396,7 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
 	hdr = (void*)&firmware->data[0];
 	if (memcmp(hdr->magic, "WMDR", 4) != 0) {
 		adsp_err(dsp, "%s: invalid magic\n", file);
-		return -EINVAL;
+		goto out_fw;
 	}
 
 	adsp_dbg(dsp, "%s: v%d.%d.%d\n", file,
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 5 lines · Charles Keepax

This patch correctly releases the firmware if the magic string in the firmware header does not match.

Change-Id I2d08f7fff92b2f0e0f2ab1fb937007e3783f815e

Applied but:
- Don't include noise like Change-Ids in upstream submissions.
- Always CC maintainers on patches (you've missed Liam).