dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Charles Keepax 2013-01-21 09:02:31 +00:00 committed by Mark Brown
parent 7881fd0fb3
commit a4cdbec758
1 changed files with 1 additions and 1 deletions

View File

@ -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,