From: Charles Keepax Date: Mon, 21 Jan 2013 09:02:31 +0000 (+0000) Subject: ASoC: wm_adsp: Release firmware on error X-Git-Tag: v3.12-rc1~1488^2~5^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a4cdbec758d2491a86ba94263b847768fa004fde;p=kernel%2Fkernel-generic.git ASoC: wm_adsp: Release firmware on error This patch correctly releases the firmware if the magic string in the firmware header does not match. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 4196f2d..b6b6548 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -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,