diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2008-07-15 01:44:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-15 01:44:01 -0400 |
commit | 0e35fd5e5264bb46d1febbe9cd9aa08421c21a96 (patch) | |
tree | 984ea14bf1e691d02b3202abeff087ba4369bc44 /net/tipc/bearer.c | |
parent | 2da59918e26837f305131cfac9c0f1b3b42bb8ae (diff) |
tipc: Eliminate improper use of TIPC_OK error code
This patch corrects many places where TIPC routines indicated
successful completion by returning TIPC_OK instead of 0.
(The TIPC_OK symbol has the value 0, but it should only be used
in contexts that deal with the error code field of a TIPC
message header.)
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bearer.c')
-rw-r--r-- | net/tipc/bearer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 271a375b49b7..6a9aba3edd08 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c | |||
@@ -370,7 +370,7 @@ void tipc_bearer_remove_dest(struct bearer *b_ptr, u32 dest) | |||
370 | */ | 370 | */ |
371 | static int bearer_push(struct bearer *b_ptr) | 371 | static int bearer_push(struct bearer *b_ptr) |
372 | { | 372 | { |
373 | u32 res = TIPC_OK; | 373 | u32 res = 0; |
374 | struct link *ln, *tln; | 374 | struct link *ln, *tln; |
375 | 375 | ||
376 | if (b_ptr->publ.blocked) | 376 | if (b_ptr->publ.blocked) |
@@ -607,7 +607,7 @@ int tipc_block_bearer(const char *name) | |||
607 | } | 607 | } |
608 | spin_unlock_bh(&b_ptr->publ.lock); | 608 | spin_unlock_bh(&b_ptr->publ.lock); |
609 | read_unlock_bh(&tipc_net_lock); | 609 | read_unlock_bh(&tipc_net_lock); |
610 | return TIPC_OK; | 610 | return 0; |
611 | } | 611 | } |
612 | 612 | ||
613 | /** | 613 | /** |
@@ -645,7 +645,7 @@ static int bearer_disable(const char *name) | |||
645 | } | 645 | } |
646 | spin_unlock_bh(&b_ptr->publ.lock); | 646 | spin_unlock_bh(&b_ptr->publ.lock); |
647 | memset(b_ptr, 0, sizeof(struct bearer)); | 647 | memset(b_ptr, 0, sizeof(struct bearer)); |
648 | return TIPC_OK; | 648 | return 0; |
649 | } | 649 | } |
650 | 650 | ||
651 | int tipc_disable_bearer(const char *name) | 651 | int tipc_disable_bearer(const char *name) |
@@ -668,7 +668,7 @@ int tipc_bearer_init(void) | |||
668 | tipc_bearers = kcalloc(MAX_BEARERS, sizeof(struct bearer), GFP_ATOMIC); | 668 | tipc_bearers = kcalloc(MAX_BEARERS, sizeof(struct bearer), GFP_ATOMIC); |
669 | media_list = kcalloc(MAX_MEDIA, sizeof(struct media), GFP_ATOMIC); | 669 | media_list = kcalloc(MAX_MEDIA, sizeof(struct media), GFP_ATOMIC); |
670 | if (tipc_bearers && media_list) { | 670 | if (tipc_bearers && media_list) { |
671 | res = TIPC_OK; | 671 | res = 0; |
672 | } else { | 672 | } else { |
673 | kfree(tipc_bearers); | 673 | kfree(tipc_bearers); |
674 | kfree(media_list); | 674 | kfree(media_list); |