aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-08-20 14:39:38 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-24 09:20:41 -0400
commit88ef5ea9767b0c7bfb4b477e1857629fe8fa2983 (patch)
tree77acb64879c9ce62f9e7fc77b33cb0d3639c8cef
parent6d37d240f2ff411c4d58bbbddefbda73a227d40c (diff)
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>
-rw-r--r--drivers/edac/i7core_edac.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 915835339d7c..d55f74a6cd49 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,
2091 return 0; 2091 return 0;
2092 2092
2093fail1: 2093fail1:
2094 list_for_each_entry(i7core_dev, &i7core_edac_list, list) { 2094 list_for_each_entry(i7core_dev, &i7core_edac_list, list)
2095 if (i7core_dev->mci) 2095 i7core_unregister_mci(i7core_dev);
2096 i7core_unregister_mci(i7core_dev); 2096
2097 }
2098 i7core_put_all_devices(); 2097 i7core_put_all_devices();
2099fail0: 2098fail0:
2100 mutex_unlock(&i7core_edac_lock); 2099 mutex_unlock(&i7core_edac_lock);
@@ -2126,10 +2125,8 @@ static void __devexit i7core_remove(struct pci_dev *pdev)
2126 return; 2125 return;
2127 } 2126 }
2128 2127
2129 list_for_each_entry(i7core_dev, &i7core_edac_list, list) { 2128 list_for_each_entry(i7core_dev, &i7core_edac_list, list)
2130 if (i7core_dev->mci) 2129 i7core_unregister_mci(i7core_dev);
2131 i7core_unregister_mci(i7core_dev);
2132 }
2133 2130
2134 /* Release PCI resources */ 2131 /* Release PCI resources */
2135 i7core_put_all_devices(); 2132 i7core_put_all_devices();