mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
crypto: cavium - fix dma_free_coherent() size
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>
This commit is contained in:
parent
c904e459cf
commit
941676c30b
|
|
@ -180,7 +180,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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user