summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAllan Stephens <Allan.Stephens@windriver.com>2010-11-30 12:00:56 +0000
committerDavid S. Miller <davem@davemloft.net>2010-12-02 13:34:03 -0800
commit28cc937eac00805e8b9c6e7ed7d590567378187f (patch)
tree76a3322b588e9461394bd8528f17aaf1de6bdb8c /net
parent8d71919d7afc4ade0d9de09e1d50fbf9168c368d (diff)
downloadop-kernel-dev-28cc937eac00805e8b9c6e7ed7d590567378187f.zip
op-kernel-dev-28cc937eac00805e8b9c6e7ed7d590567378187f.tar.gz
tipc: Eliminate useless return value when disabling a bearer
Modifies bearer_disable() to return void since it always indicates success anyway. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/tipc/bearer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 347f255..885da94 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -622,7 +622,7 @@ int tipc_block_bearer(const char *name)
* Note: This routine assumes caller holds tipc_net_lock.
*/
-static int bearer_disable(struct bearer *b_ptr)
+static void bearer_disable(struct bearer *b_ptr)
{
struct link *l_ptr;
struct link *temp_l_ptr;
@@ -638,7 +638,6 @@ static int bearer_disable(struct bearer *b_ptr)
}
spin_unlock_bh(&b_ptr->publ.lock);
memset(b_ptr, 0, sizeof(struct bearer));
- return 0;
}
int tipc_disable_bearer(const char *name)
@@ -651,8 +650,10 @@ int tipc_disable_bearer(const char *name)
if (b_ptr == NULL) {
warn("Attempt to disable unknown bearer <%s>\n", name);
res = -EINVAL;
- } else
- res = bearer_disable(b_ptr);
+ } else {
+ bearer_disable(b_ptr);
+ res = 0;
+ }
write_unlock_bh(&tipc_net_lock);
return res;
}
OpenPOWER on IntegriCloud