aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/edac_mc.c3
-rw-r--r--drivers/edac/edac_mc_sysfs.c3
-rw-r--r--drivers/edac/i7core_edac.c3
3 files changed, 4 insertions, 5 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 889ce7566b5..ba6586a69cc 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -238,6 +238,9 @@ void edac_mc_free(struct mem_ctl_info *mci)
238 debugf1("%s()\n", __func__); 238 debugf1("%s()\n", __func__);
239 239
240 edac_mc_unregister_sysfs_main_kobj(mci); 240 edac_mc_unregister_sysfs_main_kobj(mci);
241
242 /* free the mci instance memory here */
243 kfree(mci);
241} 244}
242EXPORT_SYMBOL_GPL(edac_mc_free); 245EXPORT_SYMBOL_GPL(edac_mc_free);
243 246
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index ddd76525363..2905dc10339 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -630,9 +630,6 @@ static void edac_mci_control_release(struct kobject *kobj)
630 630
631 /* decrement the module ref count */ 631 /* decrement the module ref count */
632 module_put(mci->owner); 632 module_put(mci->owner);
633
634 /* free the mci instance memory here */
635 kfree(mci);
636} 633}
637 634
638static struct kobj_type ktype_mci = { 635static struct kobj_type ktype_mci = {
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index b0559973c66..8e789a2e35d 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -2085,8 +2085,7 @@ static void __devexit i7core_remove(struct pci_dev *pdev)
2085 /* Remove MC sysfs nodes */ 2085 /* Remove MC sysfs nodes */
2086 edac_mc_del_mc(&i7core_dev->pdev[0]->dev); 2086 edac_mc_del_mc(&i7core_dev->pdev[0]->dev);
2087 2087
2088 /* Free data */ 2088 debugf1("%s: free mci struct\n", mci->ctl_name);
2089 debugf1("%s: free structs\n");
2090 kfree(mci->ctl_name); 2089 kfree(mci->ctl_name);
2091 edac_mc_free(mci); 2090 edac_mc_free(mci);
2092 2091