Skip to content

Commit

Permalink
crypto: caam - fix DMA mapping xcbc key twice
Browse files Browse the repository at this point in the history
Fix a side effect of adding xcbc support, which leads to DMA mapping the
key twice.

Fixes: 12b8567 ("crypto: caam - add support for xcbc(aes)")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Horia Geantă authored and Herbert Xu committed Feb 28, 2019
1 parent 65055e2 commit 8e731ee
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/crypto/caam/caamhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -1897,8 +1897,7 @@ static int caam_hash_cra_init(struct crypto_tfm *tfm)
}

dma_addr = dma_map_single_attrs(ctx->jrdev, ctx->sh_desc_update,
offsetof(struct caam_hash_ctx,
sh_desc_update_dma),
offsetof(struct caam_hash_ctx, key),
ctx->dir, DMA_ATTR_SKIP_CPU_SYNC);
if (dma_mapping_error(ctx->jrdev, dma_addr)) {
dev_err(ctx->jrdev, "unable to map shared descriptors\n");
Expand Down

0 comments on commit 8e731ee

Please sign in to comment.