mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
crypto: hisilicon/hpre - remove dma_free_coherent on NULL req->dst in ECDH
In hpre_ecdh_hw_data_clr_all(), req->dst is always NULL because
hpre_ecdh_dst_data_init() sets hpre_req->dst = NULL before mapping
the user buffer with dma_map_single(). The dma_free_coherent() call
on req->dst is therefore dead code. Remove it.
Fixes: 05e7b906aa ("crypto: hisilicon/hpre - add 'ECDH' algorithm")
Signed-off-by: Weili Qian <qianweili@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
9770bb7d33
commit
5b87f619cc
|
|
@ -1407,8 +1407,6 @@ static void hpre_ecdh_hw_data_clr_all(struct hpre_ctx *ctx,
|
|||
if (unlikely(dma_mapping_error(dev, dma)))
|
||||
return;
|
||||
|
||||
if (req->dst)
|
||||
dma_free_coherent(dev, ctx->key_sz << 1, req->dst, dma);
|
||||
if (dst)
|
||||
dma_unmap_single(dev, dma, ctx->key_sz << 1, DMA_FROM_DEVICE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user