* [PATCH] EDAC, thunderx: Fix an error handling path in 'thunderx_lmc_probe()'
@ 2017-08-16 4:58 Christophe JAILLET
2017-08-18 17:14 ` Borislav Petkov
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2017-08-16 4:58 UTC (permalink / raw)
To: ralf, david.daney, bp, mchehab
Cc: linux-edac, linux-mips, linux-kernel, kernel-janitors,
Christophe JAILLET
'ret' is known to be 0 at this point.
If 'ioremap()' fails, returns -ENOMEM instead of 0 which means success.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/edac/thunderx_edac.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/edac/thunderx_edac.c b/drivers/edac/thunderx_edac.c
index c8e8b9fd4772..00b89f057695 100644
--- a/drivers/edac/thunderx_edac.c
+++ b/drivers/edac/thunderx_edac.c
@@ -779,6 +779,7 @@ static int thunderx_lmc_probe(struct pci_dev *pdev,
if (!l2c_ioaddr) {
dev_err(&pdev->dev, "Cannot map L2C_CTL\n");
+ ret = -ENOMEM;
goto err_free;
}
--
2.11.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] EDAC, thunderx: Fix an error handling path in 'thunderx_lmc_probe()'
2017-08-16 4:58 [PATCH] EDAC, thunderx: Fix an error handling path in 'thunderx_lmc_probe()' Christophe JAILLET
@ 2017-08-18 17:14 ` Borislav Petkov
0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2017-08-18 17:14 UTC (permalink / raw)
To: Christophe JAILLET
Cc: ralf, david.daney, mchehab, linux-edac, linux-mips, linux-kernel,
kernel-janitors
On Wed, Aug 16, 2017 at 06:58:21AM +0200, Christophe JAILLET wrote:
> 'ret' is known to be 0 at this point.
> If 'ioremap()' fails, returns -ENOMEM instead of 0 which means success.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/edac/thunderx_edac.c | 1 +
> 1 file changed, 1 insertion(+)
Applied, thanks.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-18 17:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-16 4:58 [PATCH] EDAC, thunderx: Fix an error handling path in 'thunderx_lmc_probe()' Christophe JAILLET
2017-08-18 17:14 ` Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®