From: Wei Yongjun Date: Thu, 8 Sep 2016 15:58:04 +0000 (+0000) Subject: EDAC, fsl_ddr: Fix error return code in fsl_mc_err_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=43fa9ba632bd90b5cf63793a461e28df6af4387a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git EDAC, fsl_ddr: Fix error return code in fsl_mc_err_probe() Return negative error code from the edac_mc_add_mc() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Acked-by: York Sun Cc: linux-edac Link: http://lkml.kernel.org/r/1473350284-26482-1-git-send-email-weiyj.lk@gmail.com Signed-off-by: Borislav Petkov --- diff --git a/drivers/edac/fsl_ddr_edac.c b/drivers/edac/fsl_ddr_edac.c index 4ddf8382369f..9774f52f0c3e 100644 --- a/drivers/edac/fsl_ddr_edac.c +++ b/drivers/edac/fsl_ddr_edac.c @@ -564,7 +564,8 @@ int fsl_mc_err_probe(struct platform_device *op) /* clear all error bits */ ddr_out32(pdata->mc_vbase + FSL_MC_ERR_DETECT, ~0); - if (edac_mc_add_mc_with_groups(mci, fsl_ddr_dev_groups)) { + res = edac_mc_add_mc_with_groups(mci, fsl_ddr_dev_groups); + if (res) { edac_dbg(3, "failed edac_mc_add_mc()\n"); goto err; }