diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/edac/i7core_edac.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index 472fa375f1eb..7ee5034100b9 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c | |||
@@ -2099,7 +2099,7 @@ static void __devexit i7core_remove(struct pci_dev *pdev) | |||
2099 | } | 2099 | } |
2100 | 2100 | ||
2101 | list_for_each_entry(i7core_dev, &i7core_edac_list, list) { | 2101 | list_for_each_entry(i7core_dev, &i7core_edac_list, list) { |
2102 | mci = find_mci_by_dev(&i7core_dev->pdev[0]->dev); | 2102 | mci = i7core_dev->mci; |
2103 | if (unlikely(!mci || !mci->pvt_info)) { | 2103 | if (unlikely(!mci || !mci->pvt_info)) { |
2104 | debugf0("MC: " __FILE__ ": %s(): dev = %p\n", | 2104 | debugf0("MC: " __FILE__ ": %s(): dev = %p\n", |
2105 | __func__, &i7core_dev->pdev[0]->dev); | 2105 | __func__, &i7core_dev->pdev[0]->dev); |
@@ -2108,7 +2108,6 @@ static void __devexit i7core_remove(struct pci_dev *pdev) | |||
2108 | "Couldn't find mci hanler\n"); | 2108 | "Couldn't find mci hanler\n"); |
2109 | } else { | 2109 | } else { |
2110 | pvt = mci->pvt_info; | 2110 | pvt = mci->pvt_info; |
2111 | i7core_dev = pvt->i7core_dev; | ||
2112 | 2111 | ||
2113 | debugf0("MC: " __FILE__ ": %s(): mci = %p, dev = %p\n", | 2112 | debugf0("MC: " __FILE__ ": %s(): mci = %p, dev = %p\n", |
2114 | __func__, mci, &i7core_dev->pdev[0]->dev); | 2113 | __func__, mci, &i7core_dev->pdev[0]->dev); |
@@ -2120,7 +2119,7 @@ static void __devexit i7core_remove(struct pci_dev *pdev) | |||
2120 | i7core_pci_ctl_release(pvt); | 2119 | i7core_pci_ctl_release(pvt); |
2121 | 2120 | ||
2122 | /* Remove MC sysfs nodes */ | 2121 | /* Remove MC sysfs nodes */ |
2123 | edac_mc_del_mc(&i7core_dev->pdev[0]->dev); | 2122 | edac_mc_del_mc(mci->dev); |
2124 | 2123 | ||
2125 | debugf1("%s: free mci struct\n", mci->ctl_name); | 2124 | debugf1("%s: free mci struct\n", mci->ctl_name); |
2126 | kfree(mci->ctl_name); | 2125 | kfree(mci->ctl_name); |