mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 05:44:45 +01:00
crypto: octeontx - fix dma_free_coherent() size
The size of the buffer in alloc_command_queues() is
curr->size + OTX_CPT_NEXT_CHUNK_PTR_SIZE, so used that length for
dma_free_coherent().
Fixes: 10b4f09491 ("crypto: marvell - 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
941676c30b
commit
624a6760bf
1 changed files with 2 additions and 1 deletions
|
|
@ -168,7 +168,8 @@ static void free_command_queues(struct otx_cptvf *cptvf,
|
|||
chunk = list_first_entry(&cqinfo->queue[i].chead,
|
||||
struct otx_cpt_cmd_chunk, nextchunk);
|
||||
|
||||
dma_free_coherent(&pdev->dev, chunk->size,
|
||||
dma_free_coherent(&pdev->dev,
|
||||
chunk->size + OTX_CPT_NEXT_CHUNK_PTR_SIZE,
|
||||
chunk->head,
|
||||
chunk->dma_addr);
|
||||
chunk->head = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue