patch-2.4.2 linux/drivers/net/atari_bionet.c
Next file: linux/drivers/net/atari_pamsnet.c
Previous file: linux/drivers/net/at1700.c
Back to the patch index
Back to the overall index
- Lines: 26
- Date:
Tue Feb 13 13:15:05 2001
- Orig file:
v2.4.1/linux/drivers/net/atari_bionet.c
- Orig date:
Thu Nov 16 12:51:28 2000
diff -u --recursive --new-file v2.4.1/linux/drivers/net/atari_bionet.c linux/drivers/net/atari_bionet.c
@@ -93,7 +93,7 @@
#include <linux/ptrace.h>
#include <linux/ioport.h>
#include <linux/in.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
#include <linux/string.h>
#include <linux/delay.h>
#include <linux/timer.h>
@@ -374,6 +374,8 @@
if (dev->priv == NULL)
dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL);
+ if (!dev->priv)
+ return -ENOMEM;
memset(dev->priv, 0, sizeof(struct net_local));
dev->open = bionet_open;
@@ -551,6 +553,7 @@
memcpy(skb->data, nic_packet->buffer, pkt_len);
skb->protocol = eth_type_trans( skb, dev );
netif_rx(skb);
+ dev->last_rx = jiffies;
lp->stats.rx_packets++;
lp->stats.rx_bytes+=pkt_len;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)