kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] mv64x60_edac: fix an error code in probe()
@ 2015-01-28 19:13 Dan Carpenter
  2015-01-30 16:03 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-01-28 19:13 UTC (permalink / raw)
  To: kernel-janitors

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 <dan.carpenter@oracle.com>

diff --git a/drivers/edac/mv64x60_edac.c b/drivers/edac/mv64x60_edac.c
index 6366e88..0574e1b 100644
--- a/drivers/edac/mv64x60_edac.c
+++ b/drivers/edac/mv64x60_edac.c
@@ -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;
 	}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] mv64x60_edac: fix an error code in probe()
  2015-01-28 19:13 [patch] mv64x60_edac: fix an error code in probe() Dan Carpenter
@ 2015-01-30 16:03 ` Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2015-01-30 16:03 UTC (permalink / raw)
  To: kernel-janitors

On Wed, Jan 28, 2015 at 10:13:51PM +0300, Dan Carpenter wrote:
> 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 <dan.carpenter@oracle.com>

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-30 16:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-28 19:13 [patch] mv64x60_edac: fix an error code in probe() Dan Carpenter
2015-01-30 16:03 ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).