Skip to content

Commit

Permalink
ASoC: wm_adsp: Avoid attempt to free buffers that might still be in use
Browse files Browse the repository at this point in the history
We should not free any buffers associated with writing out coefficients
to the DSP until all the async writes have completed. This patch updates
the out of memory path when allocating a new buffer to include a call to
regmap_async_complete.

Reported-by: JS Park <aitdark.park@samsung.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
  • Loading branch information
Charles Keepax authored and Mark Brown committed Nov 17, 2014
1 parent f114040 commit 9da7a5a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/soc/codecs/wm_adsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1355,6 +1355,7 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
file, blocks, pos - firmware->size);

out_fw:
regmap_async_complete(regmap);
release_firmware(firmware);
wm_adsp_buf_free(&buf_list);
out:
Expand Down

0 comments on commit 9da7a5a

Please sign in to comment.