summaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/dwc/pcie-spear13xx.c
diff options
context:
space:
mode:
authorKrzysztof Wilczyński <kw@linux.com>2020-08-02 14:25:53 +0000
committerBjorn Helgaas <bhelgaas@google.com>2020-08-03 09:26:03 -0500
commitcaecb05c800081c57907749f787f05f62011564e (patch)
treedff3eb66aaac93e4d7f93099d9a179fddda1d3e8 /drivers/pci/controller/dwc/pcie-spear13xx.c
parentb3a9e3b9622ae10064826dccb4f7a52bd88c7407 (diff)
downloadlinux-stable-caecb05c800081c57907749f787f05f62011564e.tar.gz
linux-stable-caecb05c800081c57907749f787f05f62011564e.tar.bz2
linux-stable-caecb05c800081c57907749f787f05f62011564e.zip
PCI: Remove dev_err() when handing an error from platform_get_irq()
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 suggestions from Coccinelle, e.g., drivers/pci/controller/dwc/pcie-armada8k.c:252:2-9: line 252 is redundant because platform_get_irq() already prints an error [bhelgaas: squashed into one commit] Suggested-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20200802142601.1635926-2-kw@linux.com Link: https://lore.kernel.org/r/20200802142601.1635926-3-kw@linux.com Link: https://lore.kernel.org/r/20200802142601.1635926-4-kw@linux.com Link: https://lore.kernel.org/r/20200802142601.1635926-5-kw@linux.com Link: https://lore.kernel.org/r/20200802142601.1635926-6-kw@linux.com Link: https://lore.kernel.org/r/20200802142601.1635926-7-kw@linux.com Link: https://lore.kernel.org/r/20200802142601.1635926-8-kw@linux.com Link: https://lore.kernel.org/r/20200802142601.1635926-9-kw@linux.com Link: https://lore.kernel.org/r/20200802142601.1635926-10-kw@linux.com Link: https://lore.kernel.org/r/20200803071040.1663662-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński <kw@linux.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com> # altera Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> # dwc
Diffstat (limited to 'drivers/pci/controller/dwc/pcie-spear13xx.c')
-rw-r--r--drivers/pci/controller/dwc/pcie-spear13xx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pci/controller/dwc/pcie-spear13xx.c b/drivers/pci/controller/dwc/pcie-spear13xx.c
index 7d0cdfd8138b..ad5d08d19926 100644
--- a/drivers/pci/controller/dwc/pcie-spear13xx.c
+++ b/drivers/pci/controller/dwc/pcie-spear13xx.c
@@ -198,10 +198,9 @@ static int spear13xx_add_pcie_port(struct spear13xx_pcie *spear13xx_pcie,
int ret;
pp->irq = platform_get_irq(pdev, 0);
- if (pp->irq < 0) {
- dev_err(dev, "failed to get irq\n");
+ if (pp->irq < 0)
return pp->irq;
- }
+
ret = devm_request_irq(dev, pp->irq, spear13xx_pcie_irq_handler,
IRQF_SHARED | IRQF_NO_THREAD,
"spear1340-pcie", spear13xx_pcie);