diff options
-rw-r--r-- | net/decnet/dn_dev.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index fc6f3c023a54..ed083ab455b7 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) | |||
1145 | init_timer(&dn_db->timer); | 1145 | init_timer(&dn_db->timer); |
1146 | 1146 | ||
1147 | dn_db->uptime = jiffies; | 1147 | dn_db->uptime = jiffies; |
1148 | |||
1149 | dn_db->neigh_parms = neigh_parms_alloc(dev, &dn_neigh_table); | ||
1150 | if (!dn_db->neigh_parms) { | ||
1151 | dev->dn_ptr = NULL; | ||
1152 | kfree(dn_db); | ||
1153 | return NULL; | ||
1154 | } | ||
1155 | |||
1148 | if (dn_db->parms.up) { | 1156 | if (dn_db->parms.up) { |
1149 | if (dn_db->parms.up(dev) < 0) { | 1157 | if (dn_db->parms.up(dev) < 0) { |
1158 | neigh_parms_release(&dn_neigh_table, dn_db->neigh_parms); | ||
1150 | dev->dn_ptr = NULL; | 1159 | dev->dn_ptr = NULL; |
1151 | kfree(dn_db); | 1160 | kfree(dn_db); |
1152 | return NULL; | 1161 | return NULL; |
1153 | } | 1162 | } |
1154 | } | 1163 | } |
1155 | 1164 | ||
1156 | dn_db->neigh_parms = neigh_parms_alloc(dev, &dn_neigh_table); | ||
1157 | |||
1158 | dn_dev_sysctl_register(dev, &dn_db->parms); | 1165 | dn_dev_sysctl_register(dev, &dn_db->parms); |
1159 | 1166 | ||
1160 | dn_dev_set_timer(dev); | 1167 | dn_dev_set_timer(dev); |