Skip to contentSkip to conversation

PCI: xgene-msi: Remove redundant dev_err call in xgene_msi_probe()

PATCH Applied ErKun Yang 2 participants 4 messages Apr 8, 2021 – Aug 5, 2021

Subsystems (3)
lore
Share & tools
lore

ErKun Yang

author
#0 lore raw

PATCH v2 1/1 PCI: xgene-msi: Remove redundant dev_err call in xgene_msi_probe()

devm_ioremap_resource() internally calls __devm_ioremap_resource() which is where error checking and handling is actually having place. So the dev_err in xgene_msi_probe() seems redundant and remove it.

---
 drivers/pci/controller/pci-xgene-msi.c | 1 -
 1 file changed, 1 deletion(-)
drivers/pci/controller/pci-xgene-msi.c +0 -1
index 1c34c897a7e2..369b50f626fd 100644
@@ -451,7 +451,6 @@ static int xgene_msi_probe(struct platform_device *pdev)
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	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 = PTR_ERR(xgene_msi->msi_regs);
 		goto error;
 	}
Signature · 1 line
2.25.4
author
#1 lore raw

+ Krzysztof Wilczyński

Sorry for missing mail-to...

Quoted 24 lines · ErKun Yang

devm_ioremap_resource() internally calls __devm_ioremap_resource() which is where error checking and handling is actually having place. So the dev_err in xgene_msi_probe() seems redundant and remove it.

---
  drivers/pci/controller/pci-xgene-msi.c | 1 -
  1 file changed, 1 deletion(-)
drivers/pci/controller/pci-xgene-msi.c +0 -1
index 1c34c897a7e2..369b50f626fd 100644
@@ -451,7 +451,6 @@ static int xgene_msi_probe(struct platform_device *pdev)
  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  	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 = PTR_ERR(xgene_msi->msi_regs);
  		goto error;
  	}
author
#2 lore raw
In reply to ErKun Yang

Ping...

Quoted 24 lines · ErKun Yang

devm_ioremap_resource() internally calls __devm_ioremap_resource() which is where error checking and handling is actually having place. So the dev_err in xgene_msi_probe() seems redundant and remove it.

---
  drivers/pci/controller/pci-xgene-msi.c | 1 -
  1 file changed, 1 deletion(-)
drivers/pci/controller/pci-xgene-msi.c +0 -1
index 1c34c897a7e2..369b50f626fd 100644
@@ -451,7 +451,6 @@ static int xgene_msi_probe(struct platform_device *pdev)
  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  	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 = PTR_ERR(xgene_msi->msi_regs);
  		goto error;
  	}