summaryrefslogtreecommitdiff
path: root/drivers/edac/i82860_edac.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2015-02-02 20:26:34 +0300
committerBorislav Petkov <bp@suse.de>2015-02-23 15:06:23 +0300
commit7260194595a23e6e762cd444cb40044fd5fa25c0 (patch)
tree4f302a886daeba266b9e273d9c193765efcb0923 /drivers/edac/i82860_edac.c
parentc517d838eb7d07bbe9507871fab3931deccff539 (diff)
downloadlinux-7260194595a23e6e762cd444cb40044fd5fa25c0.tar.xz
EDAC: Delete unnecessary checks before pci_dev_put()
The pci_dev_put() function tests whether its argument is NULL and 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> Link: http://lkml.kernel.org/r/54CFC12C.9010002@users.sourceforge.net Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac/i82860_edac.c')
-rw-r--r--drivers/edac/i82860_edac.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/edac/i82860_edac.c b/drivers/edac/i82860_edac.c
index 4382343a7c60..ee1078cd3b96 100644
--- a/drivers/edac/i82860_edac.c
+++ b/drivers/edac/i82860_edac.c
@@ -343,20 +343,15 @@ fail1:
pci_unregister_driver(&i82860_driver);
fail0:
- if (mci_pdev != NULL)
- pci_dev_put(mci_pdev);
-
+ pci_dev_put(mci_pdev);
return pci_rc;
}
static void __exit i82860_exit(void)
{
edac_dbg(3, "\n");
-
pci_unregister_driver(&i82860_driver);
-
- if (mci_pdev != NULL)
- pci_dev_put(mci_pdev);
+ pci_dev_put(mci_pdev);
}
module_init(i82860_init);