diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index 889ce7566b5619ddc092e8b5d3657a1b7fcdca15..ba6586a69ccce3b000fb22ee21512ab4673b44ac 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) debugf1("%s()\n", __func__); edac_mc_unregister_sysfs_main_kobj(mci); + + /* free the mci instance memory here */ + kfree(mci); } EXPORT_SYMBOL_GPL(edac_mc_free); diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index ddd765253630498997310e0a03ee46a18c441e46..2905dc10339396a61d61e7d32aef8aae3d56dd71 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) /* decrement the module ref count */ module_put(mci->owner); - - /* free the mci instance memory here */ - kfree(mci); } static struct kobj_type ktype_mci = { diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index b0559973c66f7b55fe6bc35785b63f8bb8f759f5..8e789a2e35d64f8f8a56ce80794f854ffd958bd2 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) /* Remove MC sysfs nodes */ edac_mc_del_mc(&i7core_dev->pdev[0]->dev); - /* Free data */ - debugf1("%s: free structs\n"); + debugf1("%s: free mci struct\n", mci->ctl_name); kfree(mci->ctl_name); edac_mc_free(mci);