1 From 69c1f2c6f45a556361fd8e8d2d4eb20e2c8d3d95 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
3 Date: Thu, 18 Mar 2021 17:04:32 +0100
4 Subject: [PATCH] PCI: aardvark: Check return value of
5 generic_handle_domain_irq() when processing INTx IRQ
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 It is possible that we receive spurious INTx interrupt. Check for the
11 return value of generic_handle_domain_irq() when processing INTx IRQ.
13 Signed-off-by: Pali Rohár <pali@kernel.org>
14 Signed-off-by: Marek Behún <kabel@kernel.org>
16 drivers/pci/controller/pci-aardvark.c | 4 +++-
17 1 file changed, 3 insertions(+), 1 deletion(-)
19 diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c
20 index 01dfe70d9c2c..4be05b52d835 100644
21 --- a/drivers/pci/controller/pci-aardvark.c
22 +++ b/drivers/pci/controller/pci-aardvark.c
23 @@ -1437,7 +1437,9 @@ static void advk_pcie_handle_int(struct advk_pcie *pcie)
26 virq = irq_find_mapping(pcie->irq_domain, i);
27 - generic_handle_irq(virq);
28 + if (generic_handle_irq(virq) == -EINVAL)
29 + dev_err_ratelimited(&pcie->pdev->dev, "unexpected INT%c IRQ\n",