Skip to content

Commit 8330b9e

Browse files
chleroyjoergroedel
authored andcommitted
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 <[email protected]> Reviewed-by: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/2a2570a8d12c80a7d36837b6c586daa708ca09d7.1665033732.git.christophe.leroy@csgroup.eu Signed-off-by: Joerg Roedel <[email protected]>
1 parent 30a0b95 commit 8330b9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iommu/fsl_pamu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ static int fsl_pamu_probe(struct platform_device *pdev)
779779
of_get_address(dev->of_node, 0, &size, NULL);
780780

781781
irq = irq_of_parse_and_map(dev->of_node, 0);
782-
if (irq == NO_IRQ) {
782+
if (!irq) {
783783
dev_warn(dev, "no interrupts listed in PAMU node\n");
784784
goto error;
785785
}
@@ -903,7 +903,7 @@ static int fsl_pamu_probe(struct platform_device *pdev)
903903
return 0;
904904

905905
error:
906-
if (irq != NO_IRQ)
906+
if (irq)
907907
free_irq(irq, data);
908908

909909
kfree_sensitive(data);

0 commit comments

Comments
 (0)