Просмотр исходного кода

tipc: Optimize termination of configuration service

Termination no longer tests to see if the configuration service
port was successfully created or not. In the unlikely event that the
port was not created, attempting to delete the non-existent port is
detected gracefully and causes no harm.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Allan Stephens 13 лет назад
Родитель
Сommit
eb323b075a
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      net/tipc/config.c

+ 2 - 4
net/tipc/config.c

@@ -506,8 +506,6 @@ void tipc_cfg_reinit(void)
 
 
 void tipc_cfg_stop(void)
 void tipc_cfg_stop(void)
 {
 {
-	if (config_port_ref) {
-		tipc_deleteport(config_port_ref);
-		config_port_ref = 0;
-	}
+	tipc_deleteport(config_port_ref);
+	config_port_ref = 0;
 }
 }