Skip to content

Commit

Permalink
EDAC, mv64x60_edac: Fix an error code in probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Borislav Petkov committed Jan 30, 2015
1 parent f11135d commit 30263b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/edac/mv64x60_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,8 @@ static int mv64x60_mc_err_probe(struct platform_device *pdev)
ctl = (ctl & 0xff00ffff) | 0x10000;
out_le32(pdata->mc_vbase + MV64X60_SDRAM_ERR_ECC_CNTL, ctl);

if (edac_mc_add_mc(mci)) {
res = edac_mc_add_mc(mci);
if (res) {
edac_dbg(3, "failed edac_mc_add_mc()\n");
goto err;
}
Expand Down

0 comments on commit 30263b4

Please sign in to comment.