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>
This commit is contained in:
Tony Luck 2010-05-18 10:53:25 -03:00 committed by Mauro Carvalho Chehab
parent ac1ececea9
commit d4d1ef4515
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}