Skip to content

Commit

Permalink
EDAC, altera: Fix an error handling path in altr_s10_sdram_probe()
Browse files Browse the repository at this point in the history
If regmap_write() fails, we should release some resources as done in all
the other error handling paths of the function.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Thor Thayer <thor.thayer@linux.intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20180610174532.22071-1-christophe.jaillet@wanadoo.fr
Fixes: e9918d7 ("EDAC, altera: Handle SDRAM Uncorrectable Errors on Stratix10")
Signed-off-by: Borislav Petkov <bp@suse.de>
  • Loading branch information
Christophe JAILLET authored and Borislav Petkov committed Jun 17, 2018
1 parent ce397d2 commit 9d72fe1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/edac/altera_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,8 @@ static int altr_s10_sdram_probe(struct platform_device *pdev)
S10_DDR0_IRQ_MASK)) {
edac_printk(KERN_ERR, EDAC_MC,
"Error clearing SDRAM ECC count\n");
return -ENODEV;
ret = -ENODEV;
goto err2;
}

if (regmap_update_bits(drvdata->mc_vbase, priv->ecc_irq_en_offset,
Expand Down

0 comments on commit 9d72fe1

Please sign in to comment.