lkml.org 
[lkml]   [2017]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] EDAC, thunderx: Fix an error handling path in 'thunderx_lmc_probe()'
Date
'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
\
 
 \ /
  Last update: 2017-08-16 06:59    [W:0.025 / U:3.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site