[PATCH] EDAC, thunderx: Fix an error handling path in 'thunderx_lmc_probe()'
From: Christophe JAILLET
Date: Wed Aug 16 2017 - 00:58:32 EST
'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@xxxxxxxxxx>
---
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