summaryrefslogtreecommitdiffstats
path: root/net/decnet/dn_dev.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-26 14:47:05 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-26 14:47:05 -0800
commitd312c8f81c9810d669cdf13b28f1a5d474738eaf (patch)
treeaa7adbb2bdf84717bc6ac5c0a3bc936b9bc19116 /net/decnet/dn_dev.c
parent08eacc3157baf5d14c8e2c4ffc77c13a0ac8a85b (diff)
parent7399072a7348d025e7bcb5eb5d5e9be941d490b7 (diff)
downloadop-kernel-dev-d312c8f81c9810d669cdf13b28f1a5d474738eaf.zip
op-kernel-dev-d312c8f81c9810d669cdf13b28f1a5d474738eaf.tar.gz
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NETFILTER]: nf_conntrack_pptp: fix NAT setup of expected GRE connections [NETFILTER]: nf_nat_pptp: fix expectation removal [NETFILTER]: nf_nat: fix ICMP translation with statically linked conntrack [TCP]: Restore SKB socket owner setting in tcp_transmit_skb(). [AF_PACKET]: Check device down state before hard header callbacks. [DECNET]: Handle a failure in neigh_parms_alloc (take 2) [BNX2]: Fix 2nd port's MAC address. [TCP]: Fix sorting of SACK blocks. [AF_PACKET]: Fix BPF handling. [IPV4]: Fix the fib trie iterator to work with a single entry routing tables
Diffstat (limited to 'net/decnet/dn_dev.c')
-rw-r--r--net/decnet/dn_dev.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index fc6f3c0..ed083ab 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -1145,16 +1145,23 @@ struct dn_dev *dn_dev_create(struct net_device *dev, int *err)
init_timer(&dn_db->timer);
dn_db->uptime = jiffies;
+
+ dn_db->neigh_parms = neigh_parms_alloc(dev, &dn_neigh_table);
+ if (!dn_db->neigh_parms) {
+ dev->dn_ptr = NULL;
+ kfree(dn_db);
+ return NULL;
+ }
+
if (dn_db->parms.up) {
if (dn_db->parms.up(dev) < 0) {
+ neigh_parms_release(&dn_neigh_table, dn_db->neigh_parms);
dev->dn_ptr = NULL;
kfree(dn_db);
return NULL;
}
}
- dn_db->neigh_parms = neigh_parms_alloc(dev, &dn_neigh_table);
-
dn_dev_sysctl_register(dev, &dn_db->parms);
dn_dev_set_timer(dev);
OpenPOWER on IntegriCloud