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 <[email protected]>
Acked-by: York Sun <[email protected]>
Cc: linux-edac <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Borislav Petkov <[email protected]>
This commit is contained in:
Wei Yongjun 2016-09-08 15:58:04 +00:00 • committed by Borislav Petkov
commit 43fa9ba632

View file

@ -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;
}