Skip to content

Commit

Permalink
EDAC, mv64x60: Fix an error handling path
Browse files Browse the repository at this point in the history
We should not call edac_mc_del_mc() if a corresponding call to
edac_mc_add_mc() has not been performed yet.

So here, we should go to err instead of err2 to branch at the right
place of the error handling path.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20180107205400.14068-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Borislav Petkov <bp@suse.de>
  • Loading branch information
Christophe JAILLET authored and Borislav Petkov committed Jan 9, 2018
1 parent 86a18ee commit 68fa24f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/edac/mv64x60_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ static int mv64x60_mc_err_probe(struct platform_device *pdev)
/* Non-ECC RAM? */
printk(KERN_WARNING "%s: No ECC DIMMs discovered\n", __func__);
res = -ENODEV;
goto err2;
goto err;
}

edac_dbg(3, "init mci\n");
Expand Down

0 comments on commit 68fa24f

Please sign in to comment.