From fe33a6f1f3f8c648a5c16210d89901313f5d0a4e Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 11 Jan 2001 04:36:07 +0000 Subject: - Check get_free_pages() return value - Use only GFP_KERNEL for allocation of rings. Patch from Mingo. --- drivers/net/ioc3-eth.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers') 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; } -- cgit v1.2.3