aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/config.c
diff options
context:
space:
mode:
authorYing Xue <[email protected]>2014-05-05 00:56:16 +0000
committerDavid S. Miller <[email protected]>2014-05-05 21:26:45 +0000
commiteb8b00f5f248c50603bca383792ac3a618297be0 (patch)
tree429c3bff534952209c848f011cb675530a115b5d /net/tipc/config.c
parenttipc: define new functions to operate bc_lock (diff)
downloadkernel-eb8b00f5f248c50603bca383792ac3a618297be0.tar.gz
kernel-eb8b00f5f248c50603bca383792ac3a618297be0.zip
tipc: convert allocations of global variables associated with bclink
Convert allocations of global variables associated with bclink from static way to dynamical way for the convenience of bclink instance initialisation. Meanwhile, this also helps TIPC support name space in the future easily. Signed-off-by: Ying Xue <[email protected]> Reviewed-by: Erik Hugne <[email protected]> Reviewed-by: Jon Maloy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/tipc/config.c')
-rw-r--r--net/tipc/config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/tipc/config.c b/net/tipc/config.c
index 251f5a2028e4..2b42403ad33a 100644
--- a/net/tipc/config.c
+++ b/net/tipc/config.c
@@ -177,8 +177,10 @@ static struct sk_buff *cfg_set_own_addr(void)
if (tipc_own_addr)
return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
" (cannot change node address once assigned)");
- tipc_net_start(addr);
- return tipc_cfg_reply_none();
+ if (!tipc_net_start(addr))
+ return tipc_cfg_reply_none();
+
+ return tipc_cfg_reply_error_string("cannot change to network mode");
}
static struct sk_buff *cfg_set_max_ports(void)