Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30263b40 authored by Dan Carpenter's avatar Dan Carpenter Committed by Borislav Petkov
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: http://lkml.kernel.org/r/20150128191351.GC10259@mwanda


Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
parent f11135d8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
	}