summaryrefslogtreecommitdiffstats
path: root/net/tipc/config.c
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2014-05-05 08:56:16 +0800
committerDavid S. Miller <davem@davemloft.net>2014-05-05 17:26:45 -0400
commiteb8b00f5f248c50603bca383792ac3a618297be0 (patch)
tree429c3bff534952209c848f011cb675530a115b5d /net/tipc/config.c
parentd69afc90b8d47e471d2870f090f662e569b08407 (diff)
downloadop-kernel-dev-eb8b00f5f248c50603bca383792ac3a618297be0.zip
op-kernel-dev-eb8b00f5f248c50603bca383792ac3a618297be0.tar.gz
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 <ying.xue@windriver.com> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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 251f5a2..2b42403 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)
OpenPOWER on IntegriCloud