diff options
author | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | 2013-01-21 09:02:31 +0000 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-22 16:27:21 +0900 |
commit | f63d944b71e8c4df9daaf44c7a9756549735140c (patch) | |
tree | f008e99032b1cde0d5e4dae93cd5c8967c6cdaee /sound | |
parent | b59e0f82aa350e380142353fbd30706092ba6312 (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.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 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, |