From: Dan Carpenter Date: Wed, 28 Jan 2015 19:13:51 +0000 (+0300) Subject: EDAC, mv64x60_edac: Fix an error code in probe() X-Git-Tag: v4.9.8~4875^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=30263b4052c6bf337641e24b64eaa87fe57adf8d;p=platform%2Fkernel%2Flinux-rpi3.git 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 Link: http://lkml.kernel.org/r/20150128191351.GC10259@mwanda Signed-off-by: Borislav Petkov --- diff --git a/drivers/edac/mv64x60_edac.c b/drivers/edac/mv64x60_edac.c index 6366e88..0574e1b 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) 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; }