mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-07 03:18:31 +00:00
i7core_edac: it is safe to i7core_unregister_mci() when mci=NULL
i7core_unregister_mci() checks internally when mci=NULL. There's no need to test it outside. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
6d37d240f2
commit
88ef5ea976
1 changed files with 5 additions and 8 deletions
|
@ -2091,10 +2091,9 @@ static int __devinit i7core_probe(struct pci_dev *pdev,
|
|||
return 0;
|
||||
|
||||
fail1:
|
||||
list_for_each_entry(i7core_dev, &i7core_edac_list, list) {
|
||||
if (i7core_dev->mci)
|
||||
i7core_unregister_mci(i7core_dev);
|
||||
}
|
||||
list_for_each_entry(i7core_dev, &i7core_edac_list, list)
|
||||
i7core_unregister_mci(i7core_dev);
|
||||
|
||||
i7core_put_all_devices();
|
||||
fail0:
|
||||
mutex_unlock(&i7core_edac_lock);
|
||||
|
@ -2126,10 +2125,8 @@ static void __devexit i7core_remove(struct pci_dev *pdev)
|
|||
return;
|
||||
}
|
||||
|
||||
list_for_each_entry(i7core_dev, &i7core_edac_list, list) {
|
||||
if (i7core_dev->mci)
|
||||
i7core_unregister_mci(i7core_dev);
|
||||
}
|
||||
list_for_each_entry(i7core_dev, &i7core_edac_list, list)
|
||||
i7core_unregister_mci(i7core_dev);
|
||||
|
||||
/* Release PCI resources */
|
||||
i7core_put_all_devices();
|
||||
|
|
Loading…
Reference in a new issue