patch-2.4.6 linux/drivers/net/wan/comx-proto-fr.c

Next file: linux/drivers/net/wan/cosa.c
Previous file: linux/drivers/net/wan/comx-hw-mixcom.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.5/linux/drivers/net/wan/comx-proto-fr.c linux/drivers/net/wan/comx-proto-fr.c
@@ -503,6 +503,8 @@
 
 	if (dev != fr->master) {
 		struct sk_buff *newskb=skb_clone(skb, GFP_ATOMIC);
+		if (!newskb)
+			return -ENOMEM;
 		newskb->dev=fr->master;
 		dev_queue_xmit(newskb);
 		ch->stats.tx_bytes += skb->len;
@@ -701,7 +703,7 @@
 	} else {
 		printk(KERN_ERR "comxfr_write_proc: internal error, filename %s\n", 
 			entry->name);
-		return -EBADF;
+		count = -EBADF;
 	}
 
 	free_page((unsigned long)page);
@@ -960,30 +962,27 @@
 }
 
 static struct comx_protocol fr_master_protocol = {
-	"frad", 
-	VERSION,
-	ARPHRD_FRAD, 
-	fr_master_init, 
-	fr_exit, 
-	NULL 
+	name:		"frad", 
+	version:	VERSION,
+	encap_type:	ARPHRD_FRAD, 
+	line_init:	fr_master_init, 
+	line_exit:	fr_exit, 
 };
 
 static struct comx_protocol fr_slave_protocol = {
-	"ietf-ip", 
-	VERSION,
-	ARPHRD_DLCI, 
-	fr_slave_init, 
-	fr_exit, 
-	NULL 
+	name:		"ietf-ip", 
+	version:	VERSION,
+	encap_type:	ARPHRD_DLCI, 
+	line_init:	fr_slave_init, 
+	line_exit:	fr_exit, 
 };
 
 static struct comx_hardware fr_dlci = { 
-	"dlci", 
-	VERSION,
-	dlci_init, 
-	dlci_exit, 
-	dlci_dump, 
-	NULL 
+	name:		"dlci", 
+	version:	VERSION,
+	hw_init:	dlci_init, 
+	hw_exit:	dlci_exit, 
+	hw_dump:	dlci_dump, 
 };
 
 #ifdef MODULE

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)