aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/edac/i7core_edac.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index d2b2ed8915fd..e5aa06e6389e 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -2070,6 +2070,10 @@ static void __devexit i7core_remove(struct pci_dev *pdev)
2070 debugf0("MC: " __FILE__ ": %s(): mci = %p, dev = %p\n", 2070 debugf0("MC: " __FILE__ ": %s(): mci = %p, dev = %p\n",
2071 __func__, mci, &i7core_dev->pdev[0]->dev); 2071 __func__, mci, &i7core_dev->pdev[0]->dev);
2072 2072
2073 /* Disable MCE NMI handler */
2074 edac_mce_unregister(&pvt->edac_mce);
2075
2076 /* Disable EDAC polling */
2073 if (likely(pvt->i7core_pci)) 2077 if (likely(pvt->i7core_pci))
2074 edac_pci_release_generic_ctl(pvt->i7core_pci); 2078 edac_pci_release_generic_ctl(pvt->i7core_pci);
2075 else 2079 else
@@ -2078,11 +2082,14 @@ static void __devexit i7core_remove(struct pci_dev *pdev)
2078 i7core_dev->socket); 2082 i7core_dev->socket);
2079 pvt->i7core_pci = NULL; 2083 pvt->i7core_pci = NULL;
2080 2084
2085 /* Remove MC sysfs nodes */
2081 edac_mc_del_mc(&i7core_dev->pdev[0]->dev); 2086 edac_mc_del_mc(&i7core_dev->pdev[0]->dev);
2082 2087
2083 edac_mce_unregister(&pvt->edac_mce); 2088 /* Free data */
2084 kfree(mci->ctl_name); 2089 kfree(mci->ctl_name);
2085 edac_mc_free(mci); 2090 edac_mc_free(mci);
2091
2092 /* Release PCI resources */
2086 i7core_put_devices(i7core_dev); 2093 i7core_put_devices(i7core_dev);
2087 } 2094 }
2088 } 2095 }