aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/bridge_loop_avoidance.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-05-05 07:27:28 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-18 12:01:03 -0400
commit5346c35ebfbdb1727e60079456dd8071cb888059 (patch)
tree90bba36cd5e27b1a248cf78d4a4859b6d7275092 /net/batman-adv/bridge_loop_avoidance.c
parente0f5211f9bbfaa66d27cda6b0dc86466c7dcb206 (diff)
batman-adv: Return error codes instead of -1 on failures
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/bridge_loop_avoidance.c')
-rw-r--r--net/batman-adv/bridge_loop_avoidance.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index 0355c48db282..314e37b272a7 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -1164,13 +1164,13 @@ int bla_init(struct bat_priv *bat_priv)
1164 bat_priv->bcast_duplist_curr = 0; 1164 bat_priv->bcast_duplist_curr = 0;
1165 1165
1166 if (bat_priv->claim_hash) 1166 if (bat_priv->claim_hash)
1167 return 1; 1167 return 0;
1168 1168
1169 bat_priv->claim_hash = hash_new(128); 1169 bat_priv->claim_hash = hash_new(128);
1170 bat_priv->backbone_hash = hash_new(32); 1170 bat_priv->backbone_hash = hash_new(32);
1171 1171
1172 if (!bat_priv->claim_hash || !bat_priv->backbone_hash) 1172 if (!bat_priv->claim_hash || !bat_priv->backbone_hash)
1173 return -1; 1173 return -ENOMEM;
1174 1174
1175 batadv_hash_set_lock_class(bat_priv->claim_hash, 1175 batadv_hash_set_lock_class(bat_priv->claim_hash,
1176 &claim_hash_lock_class_key); 1176 &claim_hash_lock_class_key);
@@ -1180,7 +1180,7 @@ int bla_init(struct bat_priv *bat_priv)
1180 bat_dbg(DBG_BLA, bat_priv, "bla hashes initialized\n"); 1180 bat_dbg(DBG_BLA, bat_priv, "bla hashes initialized\n");
1181 1181
1182 bla_start_timer(bat_priv); 1182 bla_start_timer(bat_priv);
1183 return 1; 1183 return 0;
1184} 1184}
1185 1185
1186/** 1186/**