Commit 1a490117 authored by Xi Wang's avatar Xi Wang Committed by David S. Miller

ixp4xx_eth: avoid calling dma_pool_create() with NULL dev

Use &port->netdev->dev instead of NULL since dma_pool_create() doesn't
allow NULL dev.
Signed-off-by: default avatarXi Wang <xi.wang@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent da9da01d
...@@ -1102,10 +1102,12 @@ static int init_queues(struct port *port) ...@@ -1102,10 +1102,12 @@ static int init_queues(struct port *port)
{ {
int i; int i;
if (!ports_open) if (!ports_open) {
if (!(dma_pool = dma_pool_create(DRV_NAME, NULL, dma_pool = dma_pool_create(DRV_NAME, &port->netdev->dev,
POOL_ALLOC_SIZE, 32, 0))) POOL_ALLOC_SIZE, 32, 0);
if (!dma_pool)
return -ENOMEM; return -ENOMEM;
}
if (!(port->desc_tab = dma_pool_alloc(dma_pool, GFP_KERNEL, if (!(port->desc_tab = dma_pool_alloc(dma_pool, GFP_KERNEL,
&port->desc_tab_phys))) &port->desc_tab_phys)))
......
Markdown is supported
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