summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-01-11 04:36:07 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-01-11 04:36:07 +0000
commitfe33a6f1f3f8c648a5c16210d89901313f5d0a4e (patch)
tree82941e410ddd193b0c97a6f65ae1167062789070 /drivers
parent6fc3f3b279f1bf7edfd9e6080906448b0c1079be (diff)
- Check get_free_pages() return value
- Use only GFP_KERNEL for allocation of rings. Patch from Mingo.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ioc3-eth.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c
index 3ee2a207b..214bad2f5 100644
--- a/drivers/net/ioc3-eth.c
+++ b/drivers/net/ioc3-eth.c
@@ -706,8 +706,10 @@ ioc3_alloc_rings(struct net_device *dev, struct ioc3_private *ip,
if (ip->rxr == NULL) {
/* Allocate and initialize rx ring. 4kb = 512 entries */
- ip->rxr = (unsigned long *) get_free_page(GFP_KERNEL|GFP_ATOMIC);
+ ip->rxr = (unsigned long *) get_free_page(GFP_KERNEL);
rxr = (unsigned long *) ip->rxr;
+ if (!rxr)
+ printk("ioc3_alloc_rings(): get_free_page() failed!\n");
/* Now the rx buffers. The RX ring may be larger but
we only allocate 16 buffers for now. Need to tune
@@ -737,7 +739,9 @@ ioc3_alloc_rings(struct net_device *dev, struct ioc3_private *ip,
if (ip->txr == NULL) {
/* Allocate and initialize tx rings. 16kb = 128 bufs. */
- ip->txr = (struct ioc3_etxd *)__get_free_pages(GFP_KERNEL|GFP_ATOMIC, 2);
+ ip->txr = (struct ioc3_etxd *)__get_free_pages(GFP_KERNEL, 2);
+ if (!ip->txr)
+ printk("ioc3_alloc_rings(): get_free_page() failed!\n");
ip->tx_pi = 0;
ip->tx_ci = 0;
}