s390/pci: Deletion of unnecessary checks before the function call "debug_unregister"
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 22 Nov 2014 14:00:55 +0000 (15:00 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 28 Nov 2014 08:47:20 +0000 (09:47 +0100)
The debug_unregister() function performs also input parameter validation.
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: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/pci/pci_debug.c

index eec598c5939f9b173e36801122c30b13d3bf5e2a..3229a2e570df2215801c49c9c3e734cd72c503b6 100644 (file)
@@ -158,10 +158,7 @@ int __init zpci_debug_init(void)
 
 void zpci_debug_exit(void)
 {
-       if (pci_debug_msg_id)
-               debug_unregister(pci_debug_msg_id);
-       if (pci_debug_err_id)
-               debug_unregister(pci_debug_err_id);
-
+       debug_unregister(pci_debug_msg_id);
+       debug_unregister(pci_debug_err_id);
        debugfs_remove(debugfs_root);
 }