patch-2.4.10 linux/drivers/net/macsonic.c
Next file: linux/drivers/net/ncr885_debug.h
Previous file: linux/drivers/net/lp486e.c
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Sat Sep 1 11:01:28 2001
- Orig file:
v2.4.9/linux/drivers/net/macsonic.c
- Orig date:
Tue Jul 3 17:08:20 2001
diff -u --recursive --new-file v2.4.9/linux/drivers/net/macsonic.c linux/drivers/net/macsonic.c
@@ -135,8 +135,9 @@
unsigned long desc_base, desc_top;
if ((lp->sonic_desc =
kmalloc(SIZEOF_SONIC_DESC
- * SONIC_BUS_SCALE(lp->dma_bitmode), GFP_DMA)) == NULL) {
+ * SONIC_BUS_SCALE(lp->dma_bitmode), GFP_KERNEL | GFP_DMA)) == NULL) {
printk(KERN_ERR "%s: couldn't allocate descriptor buffers\n", dev->name);
+ return -ENOMEM;
}
desc_base = (unsigned long) lp->sonic_desc;
desc_top = desc_base + SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode);
@@ -165,7 +166,7 @@
/* FIXME, maybe we should use skbs */
if ((lp->rba = (char *)
- kmalloc(SONIC_NUM_RRS * SONIC_RBSIZE, GFP_DMA)) == NULL) {
+ kmalloc(SONIC_NUM_RRS * SONIC_RBSIZE, GFP_KERNEL | GFP_DMA)) == NULL) {
printk(KERN_ERR "%s: couldn't allocate receive buffers\n", dev->name);
return -ENOMEM;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)