summaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2022-10-06 07:24:03 +0200
committerJoerg Roedel <jroedel@suse.de>2022-11-03 14:45:37 +0100
commit8330b9ebf9ef10156b01d40176b9fff1ce2a374c (patch)
treef6111f1ecb9d0539610cf67c9529a887fc44c3b5 /drivers/iommu
parent30a0b95b1335e12efef89dd78518ed3e4a71a763 (diff)
downloadlinux-stable-8330b9ebf9ef10156b01d40176b9fff1ce2a374c.tar.gz
linux-stable-8330b9ebf9ef10156b01d40176b9fff1ce2a374c.tar.bz2
linux-stable-8330b9ebf9ef10156b01d40176b9fff1ce2a374c.zip
iommu/fsl_pamu: Replace NO_IRQ by 0
NO_IRQ is used to check the return of irq_of_parse_and_map(). On some architecture NO_IRQ is 0, on other architectures it is -1. irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ. So use 0 instead of using NO_IRQ. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/2a2570a8d12c80a7d36837b6c586daa708ca09d7.1665033732.git.christophe.leroy@csgroup.eu Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/fsl_pamu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c
index 0d03f837a5d4..1b53d2da2c19 100644
--- a/drivers/iommu/fsl_pamu.c
+++ b/drivers/iommu/fsl_pamu.c
@@ -779,7 +779,7 @@ static int fsl_pamu_probe(struct platform_device *pdev)
of_get_address(dev->of_node, 0, &size, NULL);
irq = irq_of_parse_and_map(dev->of_node, 0);
- if (irq == NO_IRQ) {
+ if (!irq) {
dev_warn(dev, "no interrupts listed in PAMU node\n");
goto error;
}
@@ -903,7 +903,7 @@ static int fsl_pamu_probe(struct platform_device *pdev)
return 0;
error:
- if (irq != NO_IRQ)
+ if (irq)
free_irq(irq, data);
kfree_sensitive(data);