mirror of https://github.com/thesofproject/sof.git
host: Clean up state on component reset
Clean up host state data in hd->config in component data on reset(). Signed-off-by: Eddy Hsu <eddyhsu@chromium.org>
This commit is contained in:
parent
3f2f2ff32d
commit
1c136b1d2f
|
@ -970,6 +970,9 @@ static int host_reset(struct comp_dev *dev)
|
|||
dma_sg_free(&hd->local.elem_array);
|
||||
dma_sg_free(&hd->config.elem_array);
|
||||
|
||||
/* It's safe that cleaning out `hd->config` after `dma_sg_free` for config.elem_array */
|
||||
memset(&hd->config, 0, sizeof(hd->config));
|
||||
|
||||
/* free DMA buffer */
|
||||
if (hd->dma_buffer) {
|
||||
buffer_free(hd->dma_buffer);
|
||||
|
|
Loading…
Reference in New Issue