aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/core.c')
-rw-r--r--net/tipc/core.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/net/tipc/core.c b/net/tipc/core.c
index fc05cecd7481..7ec2c1eb94f1 100644
--- a/net/tipc/core.c
+++ b/net/tipc/core.c
@@ -82,6 +82,7 @@ static void tipc_core_stop_net(void)
82{ 82{
83 tipc_net_stop(); 83 tipc_net_stop();
84 tipc_eth_media_stop(); 84 tipc_eth_media_stop();
85 tipc_ib_media_stop();
85} 86}
86 87
87/** 88/**
@@ -93,8 +94,15 @@ int tipc_core_start_net(unsigned long addr)
93 94
94 tipc_net_start(addr); 95 tipc_net_start(addr);
95 res = tipc_eth_media_start(); 96 res = tipc_eth_media_start();
96 if (res) 97 if (res < 0)
97 tipc_core_stop_net(); 98 goto err;
99 res = tipc_ib_media_start();
100 if (res < 0)
101 goto err;
102 return res;
103
104err:
105 tipc_core_stop_net();
98 return res; 106 return res;
99} 107}
100 108