bcbearer->bpairs[bp_index].secondary = p;
 update:
                if (bcbearer->remains_new.count == 0)
-                       return TIPC_OK;
+                       return 0;
 
                bcbearer->remains = bcbearer->remains_new;
        }
 
        bcbearer->bearer.publ.blocked = 1;
        bcl->stats.bearer_congs++;
-       return ~TIPC_OK;
+       return 1;
 }
 
 /**
        spin_lock_bh(&bc_lock);
        memset(&bcl->stats, 0, sizeof(bcl->stats));
        spin_unlock_bh(&bc_lock);
-       return TIPC_OK;
+       return 0;
 }
 
 int tipc_bclink_set_queue_limits(u32 limit)
        spin_lock_bh(&bc_lock);
        tipc_link_set_queue_limits(bcl, limit);
        spin_unlock_bh(&bc_lock);
-       return TIPC_OK;
+       return 0;
 }
 
 int tipc_bclink_init(void)
                tipc_printbuf_init(&bcl->print_buf, pb, BCLINK_LOG_BUF_SIZE);
        }
 
-       return TIPC_OK;
+       return 0;
 }
 
 void tipc_bclink_stop(void)
 
  */
 static int bearer_push(struct bearer *b_ptr)
 {
-       u32 res = TIPC_OK;
+       u32 res = 0;
        struct link *ln, *tln;
 
        if (b_ptr->publ.blocked)
        }
        spin_unlock_bh(&b_ptr->publ.lock);
        read_unlock_bh(&tipc_net_lock);
-       return TIPC_OK;
+       return 0;
 }
 
 /**
        }
        spin_unlock_bh(&b_ptr->publ.lock);
        memset(b_ptr, 0, sizeof(struct bearer));
-       return TIPC_OK;
+       return 0;
 }
 
 int tipc_disable_bearer(const char *name)
        tipc_bearers = kcalloc(MAX_BEARERS, sizeof(struct bearer), GFP_ATOMIC);
        media_list = kcalloc(MAX_MEDIA, sizeof(struct media), GFP_ATOMIC);
        if (tipc_bearers && media_list) {
-               res = TIPC_OK;
+               res = 0;
        } else {
                kfree(tipc_bearers);
                kfree(media_list);
 
 int tipc_cltr_init(void)
 {
        tipc_highest_allowed_slave = LOWEST_SLAVE + tipc_max_slaves;
-       return tipc_cltr_create(tipc_own_addr) ? TIPC_OK : -ENOMEM;
+       return tipc_cltr_create(tipc_own_addr) ? 0 : -ENOMEM;
 }
 
 
                                 dev->dev_addr, clone->len);
                dev_queue_xmit(clone);
        }
-       return TIPC_OK;
+       return 0;
 }
 
 /**
                        if (likely(buf->len == size)) {
                                buf->next = NULL;
                                tipc_recv_msg(buf, eb_ptr->bearer);
-                               return TIPC_OK;
+                               return 0;
                        }
                }
        }
        kfree_skb(buf);
-       return TIPC_OK;
+       return 0;
 }
 
 /**
 
                        l_ptr->retransm_queue_head = mod(++r_q_head);
                        l_ptr->retransm_queue_size = --r_q_size;
                        l_ptr->stats.retransmitted++;
-                       return TIPC_OK;
+                       return 0;
                } else {
                        l_ptr->stats.bearer_congs++;
                        msg_dbg(buf_msg(buf), "|>DEF-RETR>");
                        l_ptr->unacked_window = 0;
                        buf_discard(buf);
                        l_ptr->proto_msg_queue = NULL;
-                       return TIPC_OK;
+                       return 0;
                } else {
                        msg_dbg(buf_msg(buf), "|>DEF-PROT>");
                        l_ptr->stats.bearer_congs++;
                                        msg_set_type(msg, CLOSED_MSG);
                                msg_dbg(msg, ">PUSH-DATA>");
                                l_ptr->next_out = buf->next;
-                               return TIPC_OK;
+                               return 0;
                        } else {
                                msg_dbg(msg, "|PUSH-DATA|");
                                l_ptr->stats.bearer_congs++;
 
        do {
                res = tipc_link_push_packet(l_ptr);
-       }
-       while (res == TIPC_OK);
+       } while (!res);
+
        if (res == PUSH_FAILED)
                tipc_bearer_schedule(l_ptr->b_ptr, l_ptr);
 }
                        link_set_supervision_props(l_ptr, new_value);
                        tipc_link_send_proto_msg(l_ptr, STATE_MSG,
                                                 0, 0, new_value, 0, 0);
-                       res = TIPC_OK;
+                       res = 0;
                }
                break;
        case TIPC_CMD_SET_LINK_PRI:
                        l_ptr->priority = new_value;
                        tipc_link_send_proto_msg(l_ptr, STATE_MSG,
                                                 0, 0, 0, new_value, 0);
-                       res = TIPC_OK;
+                       res = 0;
                }
                break;
        case TIPC_CMD_SET_LINK_WINDOW:
                if ((new_value >= TIPC_MIN_LINK_WIN) &&
                    (new_value <= TIPC_MAX_LINK_WIN)) {
                        tipc_link_set_queue_limits(l_ptr, new_value);
-                       res = TIPC_OK;
+                       res = 0;
                }
                break;
        }
                        if (op == TIPC_CMD_UNBLOCK_LINK) {
                                l_ptr->blocked = 0;
                        }
-                       res = TIPC_OK;
+                       res = 0;
                }
                tipc_node_unlock(node);
        }
 
        if (!tipc_net.zones) {
                return -ENOMEM;
        }
-       return TIPC_OK;
+       return 0;
 }
 
 static void net_stop(void)
        info("Started in network mode\n");
        info("Own node address %s, network identity %u\n",
             addr_string_fill(addr_string, tipc_own_addr), tipc_net_id);
-       return TIPC_OK;
+       return 0;
 }
 
 void tipc_net_stop(void)
 
        kfree(p_ptr);
        dbg("Deleted port %u\n", ref);
        tipc_net_route_msg(buf);
-       return TIPC_OK;
+       return 0;
 }
 
 /**
                return -EINVAL;
        *isunreliable = port_unreliable(p_ptr);
        tipc_port_unlock(p_ptr);
-       return TIPC_OK;
+       return 0;
 }
 
 int tipc_set_portunreliable(u32 ref, unsigned int isunreliable)
                return -EINVAL;
        msg_set_src_droppable(&p_ptr->publ.phdr, (isunreliable != 0));
        tipc_port_unlock(p_ptr);
-       return TIPC_OK;
+       return 0;
 }
 
 static int port_unreturnable(struct port *p_ptr)
                return -EINVAL;
        *isunrejectable = port_unreturnable(p_ptr);
        tipc_port_unlock(p_ptr);
-       return TIPC_OK;
+       return 0;
 }
 
 int tipc_set_portunreturnable(u32 ref, unsigned int isunrejectable)
                return -EINVAL;
        msg_set_dest_droppable(&p_ptr->publ.phdr, (isunrejectable != 0));
        tipc_port_unlock(p_ptr);
-       return TIPC_OK;
+       return 0;
 }
 
 /*
                tipc_k_signal((Handler)port_dispatcher_sigh, 0);
        }
        spin_unlock_bh(&queue_lock);
-       return TIPC_OK;
+       return 0;
 }
 
 /*
        tipc_reg_add_port(up_ptr);
        *portref = p_ptr->publ.ref;
        tipc_port_unlock(p_ptr);
-       return TIPC_OK;
+       return 0;
 }
 
 int tipc_ownidentity(u32 ref, struct tipc_portid *id)
 {
        id->ref = ref;
        id->node = tipc_own_addr;
-       return TIPC_OK;
+       return 0;
 }
 
 int tipc_portimportance(u32 ref, unsigned int *importance)
                return -EINVAL;
        *importance = (unsigned int)msg_importance(&p_ptr->publ.phdr);
        tipc_port_unlock(p_ptr);
-       return TIPC_OK;
+       return 0;
 }
 
 int tipc_set_portimportance(u32 ref, unsigned int imp)
                return -EINVAL;
        msg_set_importance(&p_ptr->publ.phdr, (u32)imp);
        tipc_port_unlock(p_ptr);
-       return TIPC_OK;
+       return 0;
 }
 
 
                list_add(&publ->pport_list, &p_ptr->publications);
                p_ptr->pub_count++;
                p_ptr->publ.published = 1;
-               res = TIPC_OK;
+               res = 0;
        }
 exit:
        tipc_port_unlock(p_ptr);
                        tipc_nametbl_withdraw(publ->type, publ->lower,
                                              publ->ref, publ->key);
                }
-               res = TIPC_OK;
+               res = 0;
        } else {
                list_for_each_entry_safe(publ, tpubl,
                                         &p_ptr->publications, pport_list) {
                                break;
                        tipc_nametbl_withdraw(publ->type, publ->lower,
                                              publ->ref, publ->key);
-                       res = TIPC_OK;
+                       res = 0;
                        break;
                }
        }
        tipc_nodesub_subscribe(&p_ptr->subscription,peer->node,
                          (void *)(unsigned long)ref,
                          (net_ev_handler)port_handle_node_down);
-       res = TIPC_OK;
+       res = 0;
 exit:
        tipc_port_unlock(p_ptr);
        p_ptr->publ.max_pkt = tipc_link_get_max_pkt(peer->node, ref);
                /* let timer expire on it's own to avoid deadlock! */
                tipc_nodesub_unsubscribe(
                        &((struct port *)tp_ptr)->subscription);
-               res = TIPC_OK;
+               res = 0;
        } else {
                res = -ENOTCONN;
        }
                return -EINVAL;
        *isconnected = p_ptr->publ.connected;
        tipc_port_unlock(p_ptr);
-       return TIPC_OK;
+       return 0;
 }
 
 int tipc_peer(u32 ref, struct tipc_portid *peer)
        if (p_ptr->publ.connected) {
                peer->ref = port_peerport(p_ptr);
                peer->node = port_peernode(p_ptr);
-               res = TIPC_OK;
+               res = 0;
        } else
                res = -ENOTCONN;
        tipc_port_unlock(p_ptr);
 
        tipc_ref_table.index_mask = actual_size - 1;
        tipc_ref_table.start_mask = start & ~tipc_ref_table.index_mask;
 
-       return TIPC_OK;
+       return 0;
 }
 
 /**
 
                }
        }
        spin_unlock_bh(®_lock);
-       return users ? TIPC_OK : -ENOMEM;
+       return users ? 0 : -ENOMEM;
 }
 
 /**
                        tipc_k_signal((Handler)reg_callback,
                                      (unsigned long)&users[u]);
        }
-       return TIPC_OK;
+       return 0;
 }
 
 /**
 
        if (cb && (tipc_mode != TIPC_NOT_RUNNING))
                tipc_k_signal((Handler)reg_callback, (unsigned long)user_ptr);
-       return TIPC_OK;
+       return 0;
 }
 
 /**
        struct tipc_user *user_ptr;
 
        if (up_ptr->user_ref == 0)
-               return TIPC_OK;
+               return 0;
        if (up_ptr->user_ref > MAX_USERID)
                return -EINVAL;
        if ((tipc_mode == TIPC_NOT_RUNNING) || !users )
        user_ptr = &users[up_ptr->user_ref];
        list_add(&up_ptr->uport_list, &user_ptr->ports);
        spin_unlock_bh(®_lock);
-       return TIPC_OK;
+       return 0;
 }
 
 /**
 int tipc_reg_remove_port(struct user_port *up_ptr)
 {
        if (up_ptr->user_ref == 0)
-               return TIPC_OK;
+               return 0;
        if (up_ptr->user_ref > MAX_USERID)
                return -EINVAL;
        if (!users )
        spin_lock_bh(®_lock);
        list_del_init(&up_ptr->uport_list);
        spin_unlock_bh(®_lock);
-       return TIPC_OK;
+       return 0;
 }