diff options
author | Xiang Chen <chenxiang66@hisilicon.com> | 2021-03-16 09:55:25 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-03-26 20:02:34 +1100 |
commit | ade18fb4dfae66b93dfdcae93d6df8e59e569c83 (patch) | |
tree | 7cf1d71bdb1b51875fc958788b30a518dc298999 /drivers/crypto/ux500/hash | |
parent | c114ecd3a1a3d1e766d0e82ce7a930dfd0d2bce5 (diff) | |
download | linux-ade18fb4dfae66b93dfdcae93d6df8e59e569c83.tar.bz2 |
crypto: ux500 - Fix the parameter of dma_unmap_sg()
For function dma_unmap_sg(), the <nents> parameter should be number of
elements in the scatterlist prior to the mapping, not after the mapping.
So fix this usage.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ux500/hash')
-rw-r--r-- | drivers/crypto/ux500/hash/hash_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c index da284b0ea1b2..67b1237d6100 100644 --- a/drivers/crypto/ux500/hash/hash_core.c +++ b/drivers/crypto/ux500/hash/hash_core.c @@ -190,7 +190,7 @@ static void hash_dma_done(struct hash_ctx *ctx) chan = ctx->device->dma.chan_mem2hash; dmaengine_terminate_all(chan); dma_unmap_sg(chan->device->dev, ctx->device->dma.sg, - ctx->device->dma.sg_len, DMA_TO_DEVICE); + ctx->device->dma.nents, DMA_TO_DEVICE); } static int hash_dma_write(struct hash_ctx *ctx, |