public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: xgene: Fix the error return code
@ 2017-12-20  0:38 Fabio Estevam
  2017-12-20 12:14 ` Lorenzo Pieralisi
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2017-12-20  0:38 UTC (permalink / raw)
  To: bhelgaas; +Cc: dhdang, linux-pci, Fabio Estevam

In the case of IS_ERR() error, we should return PTR_ERR().

Fix the error return code.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/pci/host/pci-xgene-msi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/host/pci-xgene-msi.c b/drivers/pci/host/pci-xgene-msi.c
index 1f42a20..4a1fb01 100644
--- a/drivers/pci/host/pci-xgene-msi.c
+++ b/drivers/pci/host/pci-xgene-msi.c
@@ -465,7 +465,7 @@ static int xgene_msi_probe(struct platform_device *pdev)
 	xgene_msi->msi_regs = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(xgene_msi->msi_regs)) {
 		dev_err(&pdev->dev, "no reg space\n");
-		rc = -EINVAL;
+		rc = PTR_ERR(xgene_msi->msi_regs);
 		goto error;
 	}
 	xgene_msi->msi_addr = res->start;
-- 
2.7.4

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

end of thread, other threads:[~2018-02-14 15:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-20  0:38 [PATCH] PCI: xgene: Fix the error return code Fabio Estevam
2017-12-20 12:14 ` Lorenzo Pieralisi
2018-02-14  1:45   ` Fabio Estevam
2018-02-14 15:32     ` Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox