projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da9da01
)
ixp4xx_eth: avoid calling dma_pool_create() with NULL dev
author
Xi Wang
<
[email protected]
>
Sat, 17 Nov 2012 20:25:09 +0000
(20:25 +0000)
committer
David S. Miller
<
[email protected]
>
Tue, 20 Nov 2012 20:12:44 +0000
(15:12 -0500)
Use &port->netdev->dev instead of NULL since dma_pool_create() doesn't
allow NULL dev.
Signed-off-by: Xi Wang <
[email protected]
>
Cc: Andrew Morton <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/xscale/ixp4xx_eth.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/xscale/ixp4xx_eth.c
b/drivers/net/ethernet/xscale/ixp4xx_eth.c
index 98934bdf6acffc053fcd317721e8d92cf649ba14..477d6729b17f7f391c34a520bc08f8031bfbd4ae 100644
(file)
--- 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)))