summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2019-11-11 21:55:18 +0300
committerJoerg Roedel <jroedel@suse.de>2019-11-12 19:07:47 +0300
commit5b47748ecf2e3b7e346d6ce136e1c57239f995b0 (patch)
treebf2154407d2a42c61defaf8777742ca656907243 /drivers/iommu
parent42bb97b80f2e3bf592e3e99d109b67309aa1b30e (diff)
downloadlinux-5b47748ecf2e3b7e346d6ce136e1c57239f995b0.tar.xz
iommu/rockchip: Don't provoke WARN for harmless IRQs
Although we don't generally expect IRQs to fire for a suspended IOMMU, there are certain situations (particularly with debug options) where we might legitimately end up with the pm_runtime_get_if_in_use() call from rk_iommu_irq() returning 0. Since this doesn't represent an actual error, follow the other parts of the driver and save the WARN_ON() condition for a genuine negative value. Even if we do have spurious IRQs due to a wedged VOP asserting the shared line, it's not this driver's job to try to second-guess the IRQ core to warn about that. Reported-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Acked-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/rockchip-iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index e845bd01a1a2..9be032236a03 100644
--- a/drivers/iommu/rockchip-iommu.c
+++ b/drivers/iommu/rockchip-iommu.c
@@ -526,7 +526,7 @@ static irqreturn_t rk_iommu_irq(int irq, void *dev_id)
int i, err;
err = pm_runtime_get_if_in_use(iommu->dev);
- if (WARN_ON_ONCE(err <= 0))
+ if (!err || WARN_ON_ONCE(err < 0))
return ret;
if (WARN_ON(clk_bulk_enable(iommu->num_clocks, iommu->clocks)))