From f63d944b71e8c4df9daaf44c7a9756549735140c Mon Sep 17 00:00:00 2001 From: Charles Keepax Date: Mon, 21 Jan 2013 09:02:31 +0000 Subject: [PATCH] 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 --- sound/soc/codecs/wm_adsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index ffc89fa..046b70b 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -384,7 +384,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, -- 2.7.4