diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-20 15:39:38 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-24 11:20:41 -0200 |
commit | 88ef5ea9767b0c7bfb4b477e1857629fe8fa2983 (patch) | |
tree | 77acb64879c9ce62f9e7fc77b33cb0d3639c8cef /drivers/edac | |
parent | 6d37d240f2ff411c4d58bbbddefbda73a227d40c (diff) | |
download | op-kernel-dev-88ef5ea9767b0c7bfb4b477e1857629fe8fa2983.zip op-kernel-dev-88ef5ea9767b0c7bfb4b477e1857629fe8fa2983.tar.gz |
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>
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/i7core_edac.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index 9158353..d55f74a 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c @@ -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(); |