patch-2.2.18 linux/net/socket.c

Next file: linux/net/sunrpc/auth.c
Previous file: linux/net/packet/af_packet.c
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/net/socket.c linux/net/socket.c
@@ -579,7 +579,7 @@
 	 *	Check protocol is in range
 	 */
 	if(family<0||family>=NPROTO)
-		return -EINVAL;
+		return -EAFNOSUPPORT;
 		
 #if defined(CONFIG_KMOD) && defined(CONFIG_NET)
 	/* Attempt to load a protocol module if the find failed. 
@@ -597,7 +597,7 @@
 #endif
 
 	if (net_families[family]==NULL)
-		return -EINVAL;
+		return -EAFNOSUPPORT;
 
 /*
  *	Check that this is a type that we know how to manipulate and
@@ -1165,7 +1165,6 @@
 			/* Note - when this code becomes multithreaded on
 			 * SMP machines you have a race to fix here.
 			 */
-			err = -ENOBUFS;
 			ctl_buf = sock_kmalloc(sock->sk, ctl_len, GFP_KERNEL);
 			if (ctl_buf == NULL) 
 				goto out_freeiov;

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