Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 664f570a authored by Wei Yongjun's avatar Wei Yongjun Committed by Herbert Xu
Browse files

crypto: ccp - use kmem_cache_zalloc instead of kmem_cache_alloc/memset



Using kmem_cache_zalloc() instead of kmem_cache_alloc() and memset().

Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarGary R Hook <gary.hook@amd.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent c98ef8db
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -299,12 +299,10 @@ static struct ccp_dma_desc *ccp_alloc_dma_desc(struct ccp_dma_chan *chan,
{
	struct ccp_dma_desc *desc;

	desc = kmem_cache_alloc(chan->ccp->dma_desc_cache, GFP_NOWAIT);
	desc = kmem_cache_zalloc(chan->ccp->dma_desc_cache, GFP_NOWAIT);
	if (!desc)
		return NULL;

	memset(desc, 0, sizeof(*desc));

	dma_async_tx_descriptor_init(&desc->tx_desc, &chan->dma_chan);
	desc->tx_desc.flags = flags;
	desc->tx_desc.tx_submit = ccp_tx_submit;