Skip to content

Commit

Permalink
i7core_edac: Check probe counter in i7core_remove
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hidetoshi Seto authored and Mauro Carvalho Chehab committed Oct 24, 2010
1 parent 2896637 commit 71fe017
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/edac/i7core_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 71fe017

Please sign in to comment.