aboutsummaryrefslogtreecommitdiff
path: root/drivers/edac/i7core_edac.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2010-05-18 10:53:25 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-18 14:47:31 -0300
commitd4d1ef4515cca074d5bbe1c63420822d6b20fe63 (patch)
tree86012cc372641a92173b07dd6eea2998f373d3fd /drivers/edac/i7core_edac.c
parentac1ececea995fd77c8da6a1299674f22991cecaa (diff)
i7core_edac: don't free on success
Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/i7core_edac.c')
-rw-r--r--drivers/edac/i7core_edac.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 82acfbd0177..3e2b5379bc0 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -1856,7 +1856,8 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev,
}
fail:
- edac_mc_free(mci);
+ if (rc < 0)
+ edac_mc_free(mci);
return rc;
}