Skip to content

Commit

Permalink
tipc: Eliminate useless return value when disabling a bearer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Allan Stephens authored and David S. Miller committed Dec 2, 2010
1 parent 8d71919 commit 28cc937
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions net/tipc/bearer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand All @@ -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;
}
Expand Down

0 comments on commit 28cc937

Please sign in to comment.