diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-05 07:27:28 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-18 12:01:03 -0400 |
commit | 5346c35ebfbdb1727e60079456dd8071cb888059 (patch) | |
tree | 90bba36cd5e27b1a248cf78d4a4859b6d7275092 /net/batman-adv/vis.c | |
parent | e0f5211f9bbfaa66d27cda6b0dc86466c7dcb206 (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/vis.c')
-rw-r--r-- | net/batman-adv/vis.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c index cec216fb77c7..411c0e16f911 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) | |||
626 | best_tq = find_best_vis_server(bat_priv, info); | 626 | best_tq = find_best_vis_server(bat_priv, info); |
627 | 627 | ||
628 | if (best_tq < 0) | 628 | if (best_tq < 0) |
629 | return -1; | 629 | return best_tq; |
630 | } | 630 | } |
631 | 631 | ||
632 | for (i = 0; i < hash->size; i++) { | 632 | for (i = 0; i < hash->size; i++) { |
@@ -878,7 +878,7 @@ int vis_init(struct bat_priv *bat_priv) | |||
878 | int hash_added; | 878 | int hash_added; |
879 | 879 | ||
880 | if (bat_priv->vis_hash) | 880 | if (bat_priv->vis_hash) |
881 | return 1; | 881 | return 0; |
882 | 882 | ||
883 | spin_lock_bh(&bat_priv->vis_hash_lock); | 883 | spin_lock_bh(&bat_priv->vis_hash_lock); |
884 | 884 | ||
@@ -929,7 +929,7 @@ int vis_init(struct bat_priv *bat_priv) | |||
929 | 929 | ||
930 | spin_unlock_bh(&bat_priv->vis_hash_lock); | 930 | spin_unlock_bh(&bat_priv->vis_hash_lock); |
931 | start_vis_timer(bat_priv); | 931 | start_vis_timer(bat_priv); |
932 | return 1; | 932 | return 0; |
933 | 933 | ||
934 | free_info: | 934 | free_info: |
935 | kfree(bat_priv->my_vis_info); | 935 | kfree(bat_priv->my_vis_info); |
@@ -937,7 +937,7 @@ free_info: | |||
937 | err: | 937 | err: |
938 | spin_unlock_bh(&bat_priv->vis_hash_lock); | 938 | spin_unlock_bh(&bat_priv->vis_hash_lock); |
939 | vis_quit(bat_priv); | 939 | vis_quit(bat_priv); |
940 | return 0; | 940 | return -ENOMEM; |
941 | } | 941 | } |
942 | 942 | ||
943 | /* Decrease the reference count on a hash item info */ | 943 | /* Decrease the reference count on a hash item info */ |