mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
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>
This commit is contained in:
parent
19ca5a3cc4
commit
0a98babd85
@ -542,8 +542,7 @@ fail1:
|
||||
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 @@ fail1:
|
||||
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 @@ fail1:
|
||||
pci_unregister_driver(&x38_driver);
|
||||
|
||||
fail0:
|
||||
if (mci_pdev)
|
||||
pci_dev_put(mci_pdev);
|
||||
pci_dev_put(mci_pdev);
|
||||
|
||||
return pci_rc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user