diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-05 13:27:28 +0200 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-18 18:01:03 +0200 |
commit | 5346c35ebfbdb1727e60079456dd8071cb888059 (patch) | |
tree | 90bba36cd5e27b1a248cf78d4a4859b6d7275092 /net/batman-adv/bridge_loop_avoidance.c | |
parent | e0f5211f9bbfaa66d27cda6b0dc86466c7dcb206 (diff) | |
download | linux-3.10-5346c35ebfbdb1727e60079456dd8071cb888059.tar.gz linux-3.10-5346c35ebfbdb1727e60079456dd8071cb888059.tar.bz2 linux-3.10-5346c35ebfbdb1727e60079456dd8071cb888059.zip |
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.c | 6 |
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 0355c48db28..314e37b272a 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) bat_priv->bcast_duplist_curr = 0; if (bat_priv->claim_hash) - return 1; + return 0; bat_priv->claim_hash = hash_new(128); bat_priv->backbone_hash = hash_new(32); if (!bat_priv->claim_hash || !bat_priv->backbone_hash) - return -1; + return -ENOMEM; batadv_hash_set_lock_class(bat_priv->claim_hash, &claim_hash_lock_class_key); @@ -1180,7 +1180,7 @@ int bla_init(struct bat_priv *bat_priv) bat_dbg(DBG_BLA, bat_priv, "bla hashes initialized\n"); bla_start_timer(bat_priv); - return 1; + return 0; } /** |