Commit c0a1a0a6 authored by Lucas Stach's avatar Lucas Stach Committed by David S. Miller
Browse files

net: fec: use managed DMA API functions to allocate BD ring

So it gets freed when the device is going away.
This fixes a DMA memory leak on driver probe() fail and driver

Signed-off-by: default avatarLucas Stach <>
Signed-off-by: default avatarDavid S. Miller <>
parent 42288830
......@@ -3115,8 +3115,8 @@ static int fec_enet_init(struct net_device *ndev)
/* Allocate memory for buffer descriptors. */
cbd_base = dma_alloc_coherent(NULL, bd_size, &bd_dma,
cbd_base = dmam_alloc_coherent(&fep->pdev->dev, bd_size, &bd_dma,
if (!cbd_base) {
return -ENOMEM;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment