[PATCH 05/10] PCI: host-generic: Remove dev_err() when handing an error from platform_get_irq()
Krzysztof Wilczyński
kw at linux.com
Sun Aug 2 10:25:57 EDT 2020
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/pcie-tango.c:277:2-9: line 277 is redundant
because platform_get_irq() already prints an error
Suggested-by: Bjorn Helgaas <bhelgaas at google.com>
Signed-off-by: Krzysztof Wilczyński <kw at linux.com>
---
drivers/pci/controller/pcie-tango.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pci/controller/pcie-tango.c b/drivers/pci/controller/pcie-tango.c
index 8f640c70f936..d093a8ce4bb1 100644
--- a/drivers/pci/controller/pcie-tango.c
+++ b/drivers/pci/controller/pcie-tango.c
@@ -273,10 +273,8 @@ static int tango_pcie_probe(struct platform_device *pdev)
writel_relaxed(0, pcie->base + SMP8759_ENABLE + offset);
virq = platform_get_irq(pdev, 1);
- if (virq < 0) {
- dev_err(dev, "Failed to map IRQ\n");
+ if (virq < 0)
return virq;
- }
irq_dom = irq_domain_create_linear(fwnode, MSI_MAX, &dom_ops, pcie);
if (!irq_dom) {
--
2.27.0
More information about the Linux-rockchip
mailing list