diff mbox series

[08/10] PCI: xgene-msi: Remove dev_err() when handing an error from platform_get_irq()

Message ID 20200802142601.1635926-9-kw@linux.com (mailing list archive)
State New, archived
Headers show
Series Remove surplus dev_err() when handing an error from platform_get_irq() | expand

Commit Message

Krzysztof Wilczyński Aug. 2, 2020, 2:26 p.m. UTC
There is no need to call the dev_err() function directly to print a
custom message when handling an error from either the platform_get_irq()
or platform_get_irq_byname() functions as both are going to display an
appropriate error message in case of a failure.

This change is as per suggestion from Coccinelle:

  drivers/pci/controller/pci-xgene-msi.c:481:3-10: line 481 is redundant
  because platform_get_irq() already prints an error

Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
 drivers/pci/controller/pci-xgene-msi.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series


diff --git a/drivers/pci/controller/pci-xgene-msi.c b/drivers/pci/controller/pci-xgene-msi.c
index f4c02da84e59..02271c6d17a1 100644
--- a/drivers/pci/controller/pci-xgene-msi.c
+++ b/drivers/pci/controller/pci-xgene-msi.c
@@ -478,8 +478,6 @@  static int xgene_msi_probe(struct platform_device *pdev)
 	for (irq_index = 0; irq_index < NR_HW_IRQS; irq_index++) {
 		virt_msir = platform_get_irq(pdev, irq_index);
 		if (virt_msir < 0) {
-			dev_err(&pdev->dev, "Cannot translate IRQ index %d\n",
-				irq_index);
 			rc = virt_msir;
 			goto error;