patch-2.4.0-test3 linux/net/decnet/dn_route.c

Next file: linux/net/ipv4/Config.in
Previous file: linux/net/decnet/dn_dev.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test2/linux/net/decnet/dn_route.c linux/net/decnet/dn_route.c
@@ -789,13 +789,14 @@
 	if (dn_db->router && ((neigh = neigh_clone(dn_db->router)) != NULL))
 		goto add_entry;
 
-	if ((neigh = neigh_create(&dn_neigh_table, &cb->src, dev)) != NULL) {
+	neigh = neigh_create(&dn_neigh_table, &cb->src, dev);
+	if (!IS_ERR(neigh)) {
 		if (dev->type == ARPHRD_ETHER)
 			memcpy(neigh->ha, skb->mac.ethernet->h_source, ETH_ALEN);
 		goto add_entry;
 	}
 
-	return -ENOBUFS;
+	return PTR_ERR(neigh);
 
 non_local_input:
 

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