In fsl_hifi4_probe(), the length for dma_alloc_coherent() is
MSG_BUF_SIZE + INPUT_BUF_SIZE + OUTPUT_BUF_SIZE +
FIRMWARE_DATA_BUF_SIZE + SCRATCH_DATA_BUF_SIZE;
However, in fsl_hifi4_remove(), the length for dma_free_coherent()
is MSG_BUF_SIZE + INPUT_BUF_SIZE + OUTPUT_BUF_SIZE +
FIRMWARE_DATA_BUF_SIZE;
By keeping the same length between dma_alloc_coherent() and
dma_free_coherent() to fix this issue.
Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
misc_deregister(&hifi4_miscdev);
size = MSG_BUF_SIZE + INPUT_BUF_SIZE +
- OUTPUT_BUF_SIZE + FIRMWARE_DATA_BUF_SIZE;
+ OUTPUT_BUF_SIZE + FIRMWARE_DATA_BUF_SIZE +
+ SCRATCH_DATA_BUF_SIZE;
dma_free_coherent(&pdev->dev, size, hifi4_priv->msg_buf_virt,
hifi4_priv->msg_buf_phys);