diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2010-08-20 03:29:47 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-24 09:20:40 -0400 |
commit | 71fe01706d631513bdbd73381f4b76dacea5cf77 (patch) | |
tree | 60666b31e3a0e726dd5aba962dbd6718e8c667d1 /drivers/edac | |
parent | 2896637b86243c39a4f08d15388dcc06130fff29 (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')
-rw-r--r-- | drivers/edac/i7core_edac.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index 2e2db3c083ed..472fa375f1eb 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) | |||
2092 | */ | 2092 | */ |
2093 | 2093 | ||
2094 | mutex_lock(&i7core_edac_lock); | 2094 | mutex_lock(&i7core_edac_lock); |
2095 | |||
2096 | if (unlikely(!probed)) { | ||
2097 | mutex_unlock(&i7core_edac_lock); | ||
2098 | return; | ||
2099 | } | ||
2100 | |||
2095 | list_for_each_entry(i7core_dev, &i7core_edac_list, list) { | 2101 | list_for_each_entry(i7core_dev, &i7core_edac_list, list) { |
2096 | mci = find_mci_by_dev(&i7core_dev->pdev[0]->dev); | 2102 | mci = find_mci_by_dev(&i7core_dev->pdev[0]->dev); |
2097 | if (unlikely(!mci || !mci->pvt_info)) { | 2103 | if (unlikely(!mci || !mci->pvt_info)) { |