Commit 0a98babd authored by Markus Elfring's avatar Markus Elfring Committed by Borislav Petkov

EDAC: Delete unnecessary check before calling pci_dev_put()

The pci_dev_put() function tests whether its argument is NULL and then
returns immediately. Thus the test before the call is not needed.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Link: http://lkml.kernel.org/r/546CB20D.4070808@users.sourceforge.net
[ Boris: commit message. ]
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
parent 19ca5a3c
......@@ -542,8 +542,7 @@ static int __init i3000_init(void)
pci_unregister_driver(&i3000_driver);
fail0:
if (mci_pdev)
pci_dev_put(mci_pdev);
pci_dev_put(mci_pdev);
return pci_rc;
}
......
......@@ -523,8 +523,7 @@ static int __init i3200_init(void)
pci_unregister_driver(&i3200_driver);
fail0:
if (mci_pdev)
pci_dev_put(mci_pdev);
pci_dev_put(mci_pdev);
return pci_rc;
}
......
......@@ -458,8 +458,7 @@ static void __exit i82443bxgx_edacmc_exit(void)
if (!i82443bxgx_registered)
i82443bxgx_edacmc_remove_one(mci_pdev);
if (mci_pdev)
pci_dev_put(mci_pdev);
pci_dev_put(mci_pdev);
}
module_init(i82443bxgx_edacmc_init);
......
......@@ -500,8 +500,7 @@ static int __init x38_init(void)
pci_unregister_driver(&x38_driver);
fail0:
if (mci_pdev)
pci_dev_put(mci_pdev);
pci_dev_put(mci_pdev);
return pci_rc;
}
......
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