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>
This commit is contained in:
Hidetoshi Seto 2010-08-20 04:29:47 -03:00 committed by Mauro Carvalho Chehab
parent 2896637b86
commit 71fe01706d
1 changed files with 6 additions and 0 deletions

View File

@ -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)) {