patch-2.4.2 linux/drivers/net/atari_pamsnet.c
Next file: linux/drivers/net/atarilance.c
Previous file: linux/drivers/net/atari_bionet.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_pamsnet.c
- Orig date:
Thu Nov 16 12:51:28 2000
diff -u --recursive --new-file v2.4.1/linux/drivers/net/atari_pamsnet.c linux/drivers/net/atari_pamsnet.c
@@ -87,7 +87,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 <asm/system.h>
#include <asm/pgtable.h>
@@ -633,6 +633,8 @@
/* Initialize the device structure. */
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 = pamsnet_open;
@@ -794,6 +796,7 @@
*/
memcpy(skb->data, nic_packet->buffer, pkt_len);
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)