summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorXi Wang <xi.wang@gmail.com>2012-11-17 21:25:09 +0100
committerDavid S. Miller <davem@davemloft.net>2012-11-20 21:12:44 +0100
commit1a4901177574083c35fafc24c4d151c2a7c7647c (patch)
tree3e2cdaceb6b4f1d8bd7330a26aa3ee16422f48f5 /drivers/net/ethernet
parentne2000: add the right platform device (diff)
downloadlinux-1a4901177574083c35fafc24c4d151c2a7c7647c.tar.xz
linux-1a4901177574083c35fafc24c4d151c2a7c7647c.zip
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: Xi Wang <xi.wang@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/xscale/ixp4xx_eth.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c
index 98934bdf6acf..477d6729b17f 100644
--- a/drivers/net/ethernet/xscale/ixp4xx_eth.c
+++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c
@@ -1102,10 +1102,12 @@ static int init_queues(struct port *port)
{
int i;
- if (!ports_open)
- if (!(dma_pool = dma_pool_create(DRV_NAME, NULL,
- POOL_ALLOC_SIZE, 32, 0)))
+ if (!ports_open) {
+ dma_pool = dma_pool_create(DRV_NAME, &port->netdev->dev,
+ POOL_ALLOC_SIZE, 32, 0);
+ if (!dma_pool)
return -ENOMEM;
+ }
if (!(port->desc_tab = dma_pool_alloc(dma_pool, GFP_KERNEL,
&port->desc_tab_phys)))