mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-15 21:30:43 +00:00
crypto: caam - add missing key_dma unmap
(struct caam_ctx) ctx->key_dma needs to be unmapped when context is cleaned up. Signed-off-by: Horia Geanta <horia.geanta@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
ae4a825ffd
commit
ec31eed754
@ -2380,6 +2380,11 @@ static void caam_cra_exit(struct crypto_tfm *tfm)
|
||||
dma_unmap_single(ctx->jrdev, ctx->sh_desc_givenc_dma,
|
||||
desc_bytes(ctx->sh_desc_givenc),
|
||||
DMA_TO_DEVICE);
|
||||
if (ctx->key_dma &&
|
||||
!dma_mapping_error(ctx->jrdev, ctx->key_dma))
|
||||
dma_unmap_single(ctx->jrdev, ctx->key_dma,
|
||||
ctx->enckeylen + ctx->split_key_pad_len,
|
||||
DMA_TO_DEVICE);
|
||||
|
||||
caam_jr_free(ctx->jrdev);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user