patch-2.1.31 linux/net/appletalk/ddp.c

Next file: linux/net/core/dev.c
Previous file: linux/net/802/fddi.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.30/linux/net/appletalk/ddp.c linux/net/appletalk/ddp.c
@@ -259,6 +259,7 @@
 		else
 			iface = &tmp->next;
 	}
+	MOD_DEC_USE_COUNT;
 }
 
 static struct atalk_iface *atif_add_device(struct device *dev, struct at_addr *sa)
@@ -277,6 +278,7 @@
 	iface->next=atalk_iface_list;
 	atalk_iface_list=iface;
 	restore_flags(flags);
+	MOD_INC_USE_COUNT;
 	return iface;
 }
 
@@ -705,6 +707,8 @@
 			else
 			{
 				atif=atif_add_device(dev, &sa->sat_addr);
+				if (atif == NULL)
+					return -ENOMEM;
 			}
 			atif->nets= *nr;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov