mv64x60_edac: fix an error code in probe()
Subsystems (2)
PATCH 1/1 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 <[email protected]>
drivers/edac/mv64x60_edac.c +2 -1
@@ -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; }
Quoted 4 lines · Dan Carpenter
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 <[email protected]>
Applied, thanks.
Signature · 5 lines
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--