summaryrefslogtreecommitdiffstats
path: root/drivers/edac/i7core_edac.c
diff options
context:
space:
mode:
authorHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>2010-08-20 04:29:47 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-24 11:20:40 -0200
commit71fe01706d631513bdbd73381f4b76dacea5cf77 (patch)
tree60666b31e3a0e726dd5aba962dbd6718e8c667d1 /drivers/edac/i7core_edac.c
parent2896637b86243c39a4f08d15388dcc06130fff29 (diff)
i7core_edac: Check probe counter in i7core_remove
Prevent i7core_remove from running multiple times. Otherwise value proved will be negative and something will be wrong. Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/i7core_edac.c')
-rw-r--r--drivers/edac/i7core_edac.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 2e2db3c083e..472fa375f1e 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -2092,6 +2092,12 @@ static void __devexit i7core_remove(struct pci_dev *pdev)
*/
mutex_lock(&i7core_edac_lock);
+
+ if (unlikely(!probed)) {
+ mutex_unlock(&i7core_edac_lock);
+ return;
+ }
+
list_for_each_entry(i7core_dev, &i7core_edac_list, list) {
mci = find_mci_by_dev(&i7core_dev->pdev[0]->dev);
if (unlikely(!mci || !mci->pvt_info)) {