Skip to contentSkip to conversation

ASoC: wm_adsp: Avoid attempt to free buffers that might still be in use

PATCH Applied Charles Keepax 2 participants 2 messages Nov 17, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: wm_adsp: Avoid attempt to free buffers that might still be in use

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.

---
 sound/soc/codecs/wm_adsp.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
sound/soc/codecs/wm_adsp.c +1 -0
index 0a08ef5e..08d8ec3 100644
@@ -1343,6 +1343,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:
Signature · 1 line
1.7.2.5
maintainer Applied
#1 lore raw
Quoted 4 lines · Charles Keepax

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.

Applied, thanks.