]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
tipc: Optimize termination of configuration service
authorAllan Stephens <allan.stephens@windriver.com>
Thu, 26 Apr 2012 21:17:39 +0000 (17:17 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 26 Apr 2012 21:19:43 +0000 (17:19 -0400)
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>
net/tipc/config.c

index a4988cdbde6d611496cd8d48d2e8feef8ee1077a..843d7ae04661f013adf3240aa10aa3b1aa9916fc 100644 (file)
@@ -506,8 +506,6 @@ void tipc_cfg_reinit(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;
 }