diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2014-11-19 16:00:13 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2014-11-19 16:33:48 +0100 |
commit | 0a98babd85b2e69d64ef6f2f8a5d029ddaa702e1 (patch) | |
tree | ac47547d6f75491f4cd75e9f0d2e1f27482bd937 /drivers/edac/i82443bxgx_edac.c | |
parent | 19ca5a3cc425cc9a8abedb0f4fb7b4e7ceee2255 (diff) |
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: Markus Elfring <elfring@users.sourceforge.net>
Link: http://lkml.kernel.org/r/546CB20D.4070808@users.sourceforge.net
[ Boris: commit message. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac/i82443bxgx_edac.c')
-rw-r--r-- | drivers/edac/i82443bxgx_edac.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/edac/i82443bxgx_edac.c b/drivers/edac/i82443bxgx_edac.c index d730e276d1a8..b4705d9366bf 100644 --- a/drivers/edac/i82443bxgx_edac.c +++ b/drivers/edac/i82443bxgx_edac.c @@ -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); |