mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 17:56:42 +07:00
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: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Gary R Hook <gary.hook@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
c98ef8dbca
commit
664f570a9c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user