diff options
Diffstat (limited to 'drivers/dma/ioat/dma_v2.c')
-rw-r--r-- | drivers/dma/ioat/dma_v2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/dma/ioat/dma_v2.c b/drivers/dma/ioat/dma_v2.c index 7bbbd83d12e6..5d6ac49e0d32 100644 --- a/drivers/dma/ioat/dma_v2.c +++ b/drivers/dma/ioat/dma_v2.c | |||
@@ -397,11 +397,12 @@ static struct ioat_ring_ent *ioat2_alloc_ring_ent(struct dma_chan *chan, gfp_t f | |||
397 | return NULL; | 397 | return NULL; |
398 | memset(hw, 0, sizeof(*hw)); | 398 | memset(hw, 0, sizeof(*hw)); |
399 | 399 | ||
400 | desc = kzalloc(sizeof(*desc), flags); | 400 | desc = kmem_cache_alloc(ioat2_cache, flags); |
401 | if (!desc) { | 401 | if (!desc) { |
402 | pci_pool_free(dma->dma_pool, hw, phys); | 402 | pci_pool_free(dma->dma_pool, hw, phys); |
403 | return NULL; | 403 | return NULL; |
404 | } | 404 | } |
405 | memset(desc, 0, sizeof(*desc)); | ||
405 | 406 | ||
406 | dma_async_tx_descriptor_init(&desc->txd, chan); | 407 | dma_async_tx_descriptor_init(&desc->txd, chan); |
407 | desc->txd.tx_submit = ioat2_tx_submit_unlock; | 408 | desc->txd.tx_submit = ioat2_tx_submit_unlock; |
@@ -416,7 +417,7 @@ static void ioat2_free_ring_ent(struct ioat_ring_ent *desc, struct dma_chan *cha | |||
416 | 417 | ||
417 | dma = to_ioatdma_device(chan->device); | 418 | dma = to_ioatdma_device(chan->device); |
418 | pci_pool_free(dma->dma_pool, desc->hw, desc->txd.phys); | 419 | pci_pool_free(dma->dma_pool, desc->hw, desc->txd.phys); |
419 | kfree(desc); | 420 | kmem_cache_free(ioat2_cache, desc); |
420 | } | 421 | } |
421 | 422 | ||
422 | static struct ioat_ring_ent **ioat2_alloc_ring(struct dma_chan *c, int order, gfp_t flags) | 423 | static struct ioat_ring_ent **ioat2_alloc_ring(struct dma_chan *c, int order, gfp_t flags) |