Skip to contentSkip to conversation

mv64x60_edac: fix an error code in probe()

PATCH Applied Dan Carpenter 2 participants 2 messages Jan 28, 2015 – Jan 30, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

drivers/edac/mv64x60_edac.c +2 -1
index 6366e88..0574e1b 100644
@@ -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;
 	}
maintainer Applied
#1 lore raw
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.

Applied, thanks.

Signature · 5 lines
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--