diff options
author | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | 2013-01-21 04:02:31 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-22 02:40:26 -0500 |
commit | a4cdbec758d2491a86ba94263b847768fa004fde (patch) | |
tree | 3f7af336f1102dfcc032eeb1d419ca846583ee22 /sound/soc | |
parent | 7881fd0fb3ecc9e367ba998a4de533e7eecbdfeb (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/soc')
-rw-r--r-- | sound/soc/codecs/wm_adsp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 4196f2d54967..b6b654837585 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) | |||
396 | hdr = (void*)&firmware->data[0]; | 396 | hdr = (void*)&firmware->data[0]; |
397 | if (memcmp(hdr->magic, "WMDR", 4) != 0) { | 397 | if (memcmp(hdr->magic, "WMDR", 4) != 0) { |
398 | adsp_err(dsp, "%s: invalid magic\n", file); | 398 | adsp_err(dsp, "%s: invalid magic\n", file); |
399 | return -EINVAL; | 399 | goto out_fw; |
400 | } | 400 | } |
401 | 401 | ||
402 | adsp_dbg(dsp, "%s: v%d.%d.%d\n", file, | 402 | adsp_dbg(dsp, "%s: v%d.%d.%d\n", file, |