Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/net: Delete useless checks before function calls

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>

authored by

Markus Elfring and committed by
David S. Miller
b646c08e ee6edb97

+7 -14
+2 -4
drivers/s390/net/claw.c
··· 109 109 static void 110 110 claw_unregister_debug_facility(void) 111 111 { 112 - if (claw_dbf_setup) 113 - debug_unregister(claw_dbf_setup); 114 - if (claw_dbf_trace) 115 - debug_unregister(claw_dbf_trace); 112 + debug_unregister(claw_dbf_setup); 113 + debug_unregister(claw_dbf_trace); 116 114 } 117 115 118 116 static int
+2 -4
drivers/s390/net/lcs.c
··· 88 88 static void 89 89 lcs_unregister_debug_facility(void) 90 90 { 91 - if (lcs_dbf_setup) 92 - debug_unregister(lcs_dbf_setup); 93 - if (lcs_dbf_trace) 94 - debug_unregister(lcs_dbf_trace); 91 + debug_unregister(lcs_dbf_setup); 92 + debug_unregister(lcs_dbf_trace); 95 93 } 96 94 97 95 static int
+3 -6
drivers/s390/net/netiucv.c
··· 487 487 488 488 static void iucv_unregister_dbf_views(void) 489 489 { 490 - if (iucv_dbf_setup) 491 - debug_unregister(iucv_dbf_setup); 492 - if (iucv_dbf_data) 493 - debug_unregister(iucv_dbf_data); 494 - if (iucv_dbf_trace) 495 - debug_unregister(iucv_dbf_trace); 490 + debug_unregister(iucv_dbf_setup); 491 + debug_unregister(iucv_dbf_data); 492 + debug_unregister(iucv_dbf_trace); 496 493 } 497 494 static int iucv_register_dbf_views(void) 498 495 {