aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/net.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-10-24 10:29:26 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-12-27 11:33:47 -0500
commitc47e9b918844ab7bb139eada7b085c576ddf0afb (patch)
tree492e8ac4c1191b1c7be865efacc7833ebcb6fff9 /net/tipc/net.c
parent945af1c39df00a1e5873e38145432ba752ec49a0 (diff)
tipc: Eliminate dynamic allocation of broadcast link data structures
Creates global variables to hold the broadcast link's pseudo-bearer and pseudo-link structures, rather than allocating them dynamically. There is only a single instance of each structure, and changing over to static allocation allows elimination of code to handle the cases where dynamic allocation was unsuccessful. The memset in the teardown code may look like they aren't used, but the same teardown code is run when there is a non-fatal error at init-time, so that stale data isn't present when the user fixes the cause of the soft error. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/net.c')
-rw-r--r--net/tipc/net.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/tipc/net.c b/net/tipc/net.c
index e13162fc61cf..61afee7e8291 100644
--- a/net/tipc/net.c
+++ b/net/tipc/net.c
@@ -174,7 +174,6 @@ void tipc_net_route_msg(struct sk_buff *buf)
174int tipc_net_start(u32 addr) 174int tipc_net_start(u32 addr)
175{ 175{
176 char addr_string[16]; 176 char addr_string[16];
177 int res;
178 177
179 if (tipc_mode != TIPC_NODE_MODE) 178 if (tipc_mode != TIPC_NODE_MODE)
180 return -ENOPROTOOPT; 179 return -ENOPROTOOPT;
@@ -187,9 +186,7 @@ int tipc_net_start(u32 addr)
187 tipc_named_reinit(); 186 tipc_named_reinit();
188 tipc_port_reinit(); 187 tipc_port_reinit();
189 188
190 res = tipc_bclink_init(); 189 tipc_bclink_init();
191 if (res)
192 return res;
193 190
194 tipc_k_signal((Handler)tipc_subscr_start, 0); 191 tipc_k_signal((Handler)tipc_subscr_start, 0);
195 tipc_k_signal((Handler)tipc_cfg_init, 0); 192 tipc_k_signal((Handler)tipc_cfg_init, 0);