mirror of
https://github.com/LineageOS/android_kernel_fxtec_sm6115.git
synced 2026-08-18 10:51:49 +00:00
crypto: cavium - fix dma_free_coherent() size
[ Upstream commit 941676c30ba5b40a01bed92448f457ce62fd1f07 ]
The size of the buffer in alloc_command_queues() is
curr->size + CPT_NEXT_CHUNK_PTR_SIZE, so used that length for
dma_free_coherent().
Fixes: c694b23329 ("crypto: cavium - Add the Virtual Function driver for CPT")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Ulrich Hecht <uli@kernel.org>
This commit is contained in:
committed by
Ulrich Hecht
parent
998cb503a5
commit
a211c4dd58
@ -186,7 +186,8 @@ static void free_command_queues(struct cpt_vf *cptvf,
|
||||
|
||||
hlist_for_each_entry_safe(chunk, node, &cqinfo->queue[i].chead,
|
||||
nextchunk) {
|
||||
dma_free_coherent(&pdev->dev, chunk->size,
|
||||
dma_free_coherent(&pdev->dev,
|
||||
chunk->size + CPT_NEXT_CHUNK_PTR_SIZE,
|
||||
chunk->head,
|
||||
chunk->dma_addr);
|
||||
chunk->head = NULL;
|
||||
|
||||
Reference in New Issue
Block a user