s390/net: Delete useless checks before function calls
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 16 Jan 2015 13:05:46 +0000 (14:05 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Jan 2015 04:54:59 +0000 (23:54 -0500)
The function debug_unregister() tests whether its argument is
NULL and then returns immediately. Thus the test around the call
is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/claw.c
drivers/s390/net/lcs.c
drivers/s390/net/netiucv.c

index 213e54ee8a6660de47b05825f4ba5265bccd3463..d609ca09aa943754e45bc8ca815c7e668bdac985 100644 (file)
@@ -109,10 +109,8 @@ static debug_info_t *claw_dbf_trace;
 static void
 claw_unregister_debug_facility(void)
 {
-       if (claw_dbf_setup)
-               debug_unregister(claw_dbf_setup);
-       if (claw_dbf_trace)
-               debug_unregister(claw_dbf_trace);
+       debug_unregister(claw_dbf_setup);
+       debug_unregister(claw_dbf_trace);
 }
 
 static int
index 92190aa20b9fa1c8940bbdf79c2190bc99033e3d..00b7d9c9fe485a1c4553cda878b519526371e8b0 100644 (file)
@@ -88,10 +88,8 @@ static debug_info_t *lcs_dbf_trace;
 static void
 lcs_unregister_debug_facility(void)
 {
-       if (lcs_dbf_setup)
-               debug_unregister(lcs_dbf_setup);
-       if (lcs_dbf_trace)
-               debug_unregister(lcs_dbf_trace);
+       debug_unregister(lcs_dbf_setup);
+       debug_unregister(lcs_dbf_trace);
 }
 
 static int
index 7e91f54be7bafb8f6bb5f04acd469665e7595835..33f7040d711d6f66aaf8dbc96987664bd197c134 100644 (file)
@@ -487,12 +487,9 @@ DEFINE_PER_CPU(char[256], iucv_dbf_txt_buf);
 
 static void iucv_unregister_dbf_views(void)
 {
-       if (iucv_dbf_setup)
-               debug_unregister(iucv_dbf_setup);
-       if (iucv_dbf_data)
-               debug_unregister(iucv_dbf_data);
-       if (iucv_dbf_trace)
-               debug_unregister(iucv_dbf_trace);
+       debug_unregister(iucv_dbf_setup);
+       debug_unregister(iucv_dbf_data);
+       debug_unregister(iucv_dbf_trace);
 }
 static int iucv_register_dbf_views(void)
 {