diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-01-28 14:13:51 -0500 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2015-01-30 11:00:43 -0500 |
commit | 30263b4052c6bf337641e24b64eaa87fe57adf8d (patch) | |
tree | 03bc61f99cc6a7f44ec0b1ff570cc91201a66761 /drivers/edac | |
parent | f11135d87daebacd12e7bfb3ea66037ac9a167aa (diff) |
EDAC, mv64x60_edac: Fix an error code in probe()
If edac_mc_add_mc() fails then we should preserve the error code, but
instead the current code returns success.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: http://lkml.kernel.org/r/20150128191351.GC10259@mwanda
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/mv64x60_edac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/edac/mv64x60_edac.c b/drivers/edac/mv64x60_edac.c index 6366e880f978..0574e1bbe45c 100644 --- a/drivers/edac/mv64x60_edac.c +++ b/drivers/edac/mv64x60_edac.c | |||
@@ -789,7 +789,8 @@ static int mv64x60_mc_err_probe(struct platform_device *pdev) | |||
789 | ctl = (ctl & 0xff00ffff) | 0x10000; | 789 | ctl = (ctl & 0xff00ffff) | 0x10000; |
790 | out_le32(pdata->mc_vbase + MV64X60_SDRAM_ERR_ECC_CNTL, ctl); | 790 | out_le32(pdata->mc_vbase + MV64X60_SDRAM_ERR_ECC_CNTL, ctl); |
791 | 791 | ||
792 | if (edac_mc_add_mc(mci)) { | 792 | res = edac_mc_add_mc(mci); |
793 | if (res) { | ||
793 | edac_dbg(3, "failed edac_mc_add_mc()\n"); | 794 | edac_dbg(3, "failed edac_mc_add_mc()\n"); |
794 | goto err; | 795 | goto err; |
795 | } | 796 | } |