diff options
-rw-r--r-- | net/tipc/bearer.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 347f255b0de2..885da94be4ac 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c | |||
@@ -622,7 +622,7 @@ int tipc_block_bearer(const char *name) | |||
622 | * Note: This routine assumes caller holds tipc_net_lock. | 622 | * Note: This routine assumes caller holds tipc_net_lock. |
623 | */ | 623 | */ |
624 | 624 | ||
625 | static int bearer_disable(struct bearer *b_ptr) | 625 | static void bearer_disable(struct bearer *b_ptr) |
626 | { | 626 | { |
627 | struct link *l_ptr; | 627 | struct link *l_ptr; |
628 | struct link *temp_l_ptr; | 628 | struct link *temp_l_ptr; |
@@ -638,7 +638,6 @@ static int bearer_disable(struct bearer *b_ptr) | |||
638 | } | 638 | } |
639 | spin_unlock_bh(&b_ptr->publ.lock); | 639 | spin_unlock_bh(&b_ptr->publ.lock); |
640 | memset(b_ptr, 0, sizeof(struct bearer)); | 640 | memset(b_ptr, 0, sizeof(struct bearer)); |
641 | return 0; | ||
642 | } | 641 | } |
643 | 642 | ||
644 | int tipc_disable_bearer(const char *name) | 643 | int tipc_disable_bearer(const char *name) |
@@ -651,8 +650,10 @@ int tipc_disable_bearer(const char *name) | |||
651 | if (b_ptr == NULL) { | 650 | if (b_ptr == NULL) { |
652 | warn("Attempt to disable unknown bearer <%s>\n", name); | 651 | warn("Attempt to disable unknown bearer <%s>\n", name); |
653 | res = -EINVAL; | 652 | res = -EINVAL; |
654 | } else | 653 | } else { |
655 | res = bearer_disable(b_ptr); | 654 | bearer_disable(b_ptr); |
655 | res = 0; | ||
656 | } | ||
656 | write_unlock_bh(&tipc_net_lock); | 657 | write_unlock_bh(&tipc_net_lock); |
657 | return res; | 658 | return res; |
658 | } | 659 | } |