linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [V2] EDAC, altera: Fix an error handling path in 'altr_s10_sdram_probe()'
@ 2018-06-11 14:53 thor.thayer
  0 siblings, 0 replies; 3+ messages in thread
From: thor.thayer @ 2018-06-11 14:53 UTC (permalink / raw)
  To: Christophe JAILLET, bp, mchehab; +Cc: linux-edac, linux-kernel, kernel-janitors

On 06/10/2018 12:45 PM, Christophe JAILLET wrote:
> IF 'regmap_write()' fails, we should release some resources as done in all
> the other error handling paths of the function.
> 
> Fixes: e9918d7fafae ("EDAC, altera: Handle SDRAM Uncorrectable Errors on Stratix10")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> v1 -> v2: Fix subject line
> ---
>   drivers/edac/altera_edac.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
> index d0d5c4dbe097..5762c3c383f2 100644
> --- a/drivers/edac/altera_edac.c
> +++ b/drivers/edac/altera_edac.c
> @@ -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,
> Thanks.

Reviewed-by: Thor Thayer <thor.thayer@linux.intel.com>
---
To unsubscribe from this list: send the line "unsubscribe linux-edac" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [V2] EDAC, altera: Fix an error handling path in 'altr_s10_sdram_probe()'
@ 2018-06-17 10:45 Borislav Petkov
  0 siblings, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2018-06-17 10:45 UTC (permalink / raw)
  To: Thor Thayer, Christophe JAILLET
  Cc: mchehab, linux-edac, linux-kernel, kernel-janitors

On Mon, Jun 11, 2018 at 09:53:53AM -0500, Thor Thayer wrote:
> On 06/10/2018 12:45 PM, Christophe JAILLET wrote:
> > IF 'regmap_write()' fails, we should release some resources as done in all
> > the other error handling paths of the function.
> > 
> > Fixes: e9918d7fafae ("EDAC, altera: Handle SDRAM Uncorrectable Errors on Stratix10")
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> > ---
> > v1 -> v2: Fix subject line
> > ---
> >   drivers/edac/altera_edac.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
> > index d0d5c4dbe097..5762c3c383f2 100644
> > --- a/drivers/edac/altera_edac.c
> > +++ b/drivers/edac/altera_edac.c
> > @@ -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,
> > Thanks.
> 
> Reviewed-by: Thor Thayer <thor.thayer@linux.intel.com>

Applied, thanks.

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

* [V2] EDAC, altera: Fix an error handling path in 'altr_s10_sdram_probe()'
@ 2018-06-10 17:45 Christophe JAILLET
  0 siblings, 0 replies; 3+ messages in thread
From: Christophe JAILLET @ 2018-06-10 17:45 UTC (permalink / raw)
  To: thor.thayer, bp, mchehab
  Cc: linux-edac, linux-kernel, kernel-janitors, Christophe JAILLET

IF 'regmap_write()' fails, we should release some resources as done in all
the other error handling paths of the function.

Fixes: e9918d7fafae ("EDAC, altera: Handle SDRAM Uncorrectable Errors on Stratix10")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
v1 -> v2: Fix subject line
---
 drivers/edac/altera_edac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
index d0d5c4dbe097..5762c3c383f2 100644
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -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,

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

end of thread, other threads:[~2018-06-17 10:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-11 14:53 [V2] EDAC, altera: Fix an error handling path in 'altr_s10_sdram_probe()' thor.thayer
  -- strict thread matches above, loose matches on Subject: below --
2018-06-17 10:45 Borislav Petkov
2018-06-10 17:45 Christophe JAILLET

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).