Messages in this thread Patch in this message |  | | From | Christophe JAILLET <> | Subject | [PATCH] EDAC, thunderx: Fix an error handling path in 'thunderx_lmc_probe()' | Date | Wed, 16 Aug 2017 06:58:21 +0200 |
| |
'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
|  |