diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-01-16 08:05:46 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-17 23:54:59 -0500 |
commit | b646c08e12c1879e1cfb94d3875e62024b706c4a (patch) | |
tree | d1d33b68b738e74a57041a985e99c54cf85543b2 | |
parent | ee6edb9707cf2c50bc3df66b06df33a6aa8c9075 (diff) |
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>
-rw-r--r-- | drivers/s390/net/claw.c | 6 | ||||
-rw-r--r-- | drivers/s390/net/lcs.c | 6 | ||||
-rw-r--r-- | drivers/s390/net/netiucv.c | 9 |
3 files changed, 7 insertions, 14 deletions
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index 213e54ee8a66..d609ca09aa94 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
@@ -109,10 +109,8 @@ static debug_info_t *claw_dbf_trace; | |||
109 | static void | 109 | static void |
110 | claw_unregister_debug_facility(void) | 110 | claw_unregister_debug_facility(void) |
111 | { | 111 | { |
112 | if (claw_dbf_setup) | 112 | debug_unregister(claw_dbf_setup); |
113 | debug_unregister(claw_dbf_setup); | 113 | debug_unregister(claw_dbf_trace); |
114 | if (claw_dbf_trace) | ||
115 | debug_unregister(claw_dbf_trace); | ||
116 | } | 114 | } |
117 | 115 | ||
118 | static int | 116 | static int |
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index 92190aa20b9f..00b7d9c9fe48 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c | |||
@@ -88,10 +88,8 @@ static debug_info_t *lcs_dbf_trace; | |||
88 | static void | 88 | static void |
89 | lcs_unregister_debug_facility(void) | 89 | lcs_unregister_debug_facility(void) |
90 | { | 90 | { |
91 | if (lcs_dbf_setup) | 91 | debug_unregister(lcs_dbf_setup); |
92 | debug_unregister(lcs_dbf_setup); | 92 | debug_unregister(lcs_dbf_trace); |
93 | if (lcs_dbf_trace) | ||
94 | debug_unregister(lcs_dbf_trace); | ||
95 | } | 93 | } |
96 | 94 | ||
97 | static int | 95 | static int |
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index 7e91f54be7ba..33f7040d711d 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -487,12 +487,9 @@ DEFINE_PER_CPU(char[256], iucv_dbf_txt_buf); | |||
487 | 487 | ||
488 | static void iucv_unregister_dbf_views(void) | 488 | static void iucv_unregister_dbf_views(void) |
489 | { | 489 | { |
490 | if (iucv_dbf_setup) | 490 | debug_unregister(iucv_dbf_setup); |
491 | debug_unregister(iucv_dbf_setup); | 491 | debug_unregister(iucv_dbf_data); |
492 | if (iucv_dbf_data) | 492 | debug_unregister(iucv_dbf_trace); |
493 | debug_unregister(iucv_dbf_data); | ||
494 | if (iucv_dbf_trace) | ||
495 | debug_unregister(iucv_dbf_trace); | ||
496 | } | 493 | } |
497 | static int iucv_register_dbf_views(void) | 494 | static int iucv_register_dbf_views(void) |
498 | { | 495 | { |