aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/batman-adv/hard-interface.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index 282bf6e9353e..2c5a247a8f12 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -313,7 +313,13 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,
313 hard_iface->if_num = bat_priv->num_ifaces; 313 hard_iface->if_num = bat_priv->num_ifaces;
314 bat_priv->num_ifaces++; 314 bat_priv->num_ifaces++;
315 hard_iface->if_status = BATADV_IF_INACTIVE; 315 hard_iface->if_status = BATADV_IF_INACTIVE;
316 batadv_orig_hash_add_if(hard_iface, bat_priv->num_ifaces); 316 ret = batadv_orig_hash_add_if(hard_iface, bat_priv->num_ifaces);
317 if (ret < 0) {
318 bat_priv->bat_algo_ops->bat_iface_disable(hard_iface);
319 bat_priv->num_ifaces--;
320 hard_iface->if_status = BATADV_IF_NOT_IN_USE;
321 goto err_dev;
322 }
317 323
318 hard_iface->batman_adv_ptype.type = ethertype; 324 hard_iface->batman_adv_ptype.type = ethertype;
319 hard_iface->batman_adv_ptype.func = batadv_batman_skb_recv; 325 hard_iface->batman_adv_ptype.func = batadv_batman_skb_recv;