aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/edac/i7core_edac.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 6bebf4d73f48..3542e8c0a63f 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -1954,7 +1954,7 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev,
1954 /* Store pci devices at mci for faster access */ 1954 /* Store pci devices at mci for faster access */
1955 rc = mci_bind_devs(mci, i7core_dev); 1955 rc = mci_bind_devs(mci, i7core_dev);
1956 if (unlikely(rc < 0)) 1956 if (unlikely(rc < 0))
1957 goto fail; 1957 goto fail0;
1958 1958
1959 if (pvt->is_registered) 1959 if (pvt->is_registered)
1960 mci->mc_driver_sysfs_attributes = i7core_sysfs_rdimm_attrs; 1960 mci->mc_driver_sysfs_attributes = i7core_sysfs_rdimm_attrs;
@@ -1977,7 +1977,7 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev,
1977 */ 1977 */
1978 1978
1979 rc = -EINVAL; 1979 rc = -EINVAL;
1980 goto fail; 1980 goto fail0;
1981 } 1981 }
1982 1982
1983 /* Default error mask is any memory */ 1983 /* Default error mask is any memory */
@@ -1998,11 +1998,17 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev,
1998 if (unlikely(rc < 0)) { 1998 if (unlikely(rc < 0)) {
1999 debugf0("MC: " __FILE__ 1999 debugf0("MC: " __FILE__
2000 ": %s(): failed edac_mce_register()\n", __func__); 2000 ": %s(): failed edac_mce_register()\n", __func__);
2001 goto fail1;
2001 } 2002 }
2002 2003
2003fail: 2004 return 0;
2004 if (rc < 0) 2005
2005 edac_mc_free(mci); 2006fail1:
2007 i7core_pci_ctl_release(pvt);
2008 edac_mc_del_mc(mci->dev);
2009fail0:
2010 kfree(mci->ctl_name);
2011 edac_mc_free(mci);
2006 return rc; 2012 return rc;
2007} 2013}
2008 2014