Skip to content

Commit

Permalink
ASoC: wm_adsp: Release firmware on error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Charles Keepax authored and Mark Brown committed Jan 22, 2013
1 parent 7881fd0 commit a4cdbec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/wm_adsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a4cdbec

Please sign in to comment.