summaryrefslogtreecommitdiff
path: root/net/batman-adv/vis.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-05-05 11:27:28 (GMT)
committerAntonio Quartulli <ordex@autistici.org>2012-06-18 16:01:03 (GMT)
commit5346c35ebfbdb1727e60079456dd8071cb888059 (patch)
tree90bba36cd5e27b1a248cf78d4a4859b6d7275092 /net/batman-adv/vis.c
parente0f5211f9bbfaa66d27cda6b0dc86466c7dcb206 (diff)
downloadlinux-5346c35ebfbdb1727e60079456dd8071cb888059.tar.xz
batman-adv: Return error codes instead of -1 on failures
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/vis.c')
-rw-r--r--net/batman-adv/vis.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c
index cec216f..411c0e1 100644
--- a/net/batman-adv/vis.c
+++ b/net/batman-adv/vis.c
@@ -626,7 +626,7 @@ static int generate_vis_packet(struct bat_priv *bat_priv)
best_tq = find_best_vis_server(bat_priv, info);
if (best_tq < 0)
- return -1;
+ return best_tq;
}
for (i = 0; i < hash->size; i++) {
@@ -878,7 +878,7 @@ int vis_init(struct bat_priv *bat_priv)
int hash_added;
if (bat_priv->vis_hash)
- return 1;
+ return 0;
spin_lock_bh(&bat_priv->vis_hash_lock);
@@ -929,7 +929,7 @@ int vis_init(struct bat_priv *bat_priv)
spin_unlock_bh(&bat_priv->vis_hash_lock);
start_vis_timer(bat_priv);
- return 1;
+ return 0;
free_info:
kfree(bat_priv->my_vis_info);
@@ -937,7 +937,7 @@ free_info:
err:
spin_unlock_bh(&bat_priv->vis_hash_lock);
vis_quit(bat_priv);
- return 0;
+ return -ENOMEM;
}
/* Decrease the reference count on a hash item info */