Commit 43fa9ba6 authored by Wei Yongjun's avatar Wei Yongjun Committed by Borislav Petkov

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: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarYork Sun <york.sun@nxp.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1473350284-26482-1-git-send-email-weiyj.lk@gmail.comSigned-off-by: default avatarBorislav Petkov <bp@suse.de>
parent 7d136731
...@@ -564,7 +564,8 @@ int fsl_mc_err_probe(struct platform_device *op) ...@@ -564,7 +564,8 @@ int fsl_mc_err_probe(struct platform_device *op)
/* clear all error bits */ /* clear all error bits */
ddr_out32(pdata->mc_vbase + FSL_MC_ERR_DETECT, ~0); 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"); edac_dbg(3, "failed edac_mc_add_mc()\n");
goto err; goto err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment