Commit b646c08e authored by Markus Elfring's avatar Markus Elfring Committed by David S. Miller

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarUrsula Braun <ursula.braun@de.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ee6edb97
...@@ -109,9 +109,7 @@ static debug_info_t *claw_dbf_trace; ...@@ -109,9 +109,7 @@ static debug_info_t *claw_dbf_trace;
static void static void
claw_unregister_debug_facility(void) claw_unregister_debug_facility(void)
{ {
if (claw_dbf_setup)
debug_unregister(claw_dbf_setup); debug_unregister(claw_dbf_setup);
if (claw_dbf_trace)
debug_unregister(claw_dbf_trace); debug_unregister(claw_dbf_trace);
} }
......
...@@ -88,9 +88,7 @@ static debug_info_t *lcs_dbf_trace; ...@@ -88,9 +88,7 @@ static debug_info_t *lcs_dbf_trace;
static void static void
lcs_unregister_debug_facility(void) lcs_unregister_debug_facility(void)
{ {
if (lcs_dbf_setup)
debug_unregister(lcs_dbf_setup); debug_unregister(lcs_dbf_setup);
if (lcs_dbf_trace)
debug_unregister(lcs_dbf_trace); debug_unregister(lcs_dbf_trace);
} }
......
...@@ -487,11 +487,8 @@ DEFINE_PER_CPU(char[256], iucv_dbf_txt_buf); ...@@ -487,11 +487,8 @@ DEFINE_PER_CPU(char[256], iucv_dbf_txt_buf);
static void iucv_unregister_dbf_views(void) static void iucv_unregister_dbf_views(void)
{ {
if (iucv_dbf_setup)
debug_unregister(iucv_dbf_setup); debug_unregister(iucv_dbf_setup);
if (iucv_dbf_data)
debug_unregister(iucv_dbf_data); debug_unregister(iucv_dbf_data);
if (iucv_dbf_trace)
debug_unregister(iucv_dbf_trace); debug_unregister(iucv_dbf_trace);
} }
static int iucv_register_dbf_views(void) static int iucv_register_dbf_views(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment