summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2013-01-21 09:02:31 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-22 16:27:21 +0900
commitf63d944b71e8c4df9daaf44c7a9756549735140c (patch)
treef008e99032b1cde0d5e4dae93cd5c8967c6cdaee /sound
parentb59e0f82aa350e380142353fbd30706092ba6312 (diff)
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 <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm_adsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index ffc89fab96fb..046b70be6bee 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,