Skip to content

Commit

Permalink
s390/pci: Deletion of unnecessary checks before the function call "de…
Browse files Browse the repository at this point in the history
…bug_unregister"

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>
  • Loading branch information
Markus Elfring authored and Martin Schwidefsky committed Nov 28, 2014
1 parent 7eed2e0 commit 8c080bd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions arch/s390/pci/pci_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 8c080bd

Please sign in to comment.