Skip to contentSkip to conversation

PCI: xgene: Fix the error return code

PATCH Applied Fabio Estevam 2 participants 4 messages Dec 20, 2017 – Feb 14, 2018 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: xgene: Fix the error return code

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

Fix the error return code.

---
 drivers/pci/host/pci-xgene-msi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/host/pci-xgene-msi.c +1 -1
index 1f42a20..4a1fb01 100644
@@ -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;
Signature · 1 line
2.7.4
#1 lore raw

[+ Khuong Dinh]

Quoted 8 lines · Fabio Estevam

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

Fix the error return code.

---
 drivers/pci/host/pci-xgene-msi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

I am about to apply this patch, please let me know if you see any issue with that.

Thanks,
Lorenzo

Quoted 16 lines
drivers/pci/host/pci-xgene-msi.c +1 -1
index 1f42a20..4a1fb01 100644
@@ -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;
Signature · 1 line
2.7.4
#2 lore raw

Khuong Dinh, Lorenzo,

Quoted 7 lines · Lorenzo Pieralisi

[+ Khuong Dinh]

Quoted 4 lines · Fabio Estevam

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

Fix the error return code.

Quoted 7 lines
Quoted 4 lines
---
 drivers/pci/host/pci-xgene-msi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

I am about to apply this patch, please let me know if you see any issue with that.

A gente ping.

Quoted 20 lines

Thanks,
Lorenzo

Quoted 16 lines
drivers/pci/host/pci-xgene-msi.c +1 -2
index 1f42a20..4a1fb01 100644
@@ -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

#3 lore raw
Quoted 16 lines · Fabio Estevam

Khuong Dinh, Lorenzo,

Quoted 12 lines · Lorenzo Pieralisi

[+ Khuong Dinh]

Quoted 8 lines · Fabio Estevam

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

Fix the error return code.

---
 drivers/pci/host/pci-xgene-msi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines
Quoted 2 lines

I am about to apply this patch, please let me know if you see any issue with that.

A gente ping.

Applied to pci/xgene for v4.17, sorry for the delay.

Lorenzo

Quoted 19 lines
Quoted 19 lines

Thanks,
Lorenzo

Quoted 16 lines
drivers/pci/host/pci-xgene-msi.c +1 -2
index 1f42a20..4a1fb01 100644
@@ -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