Commit 8330b9eb authored by Christophe Leroy's avatar Christophe Leroy Committed by Joerg Roedel
Browse files

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: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: default avatarRobin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/2a2570a8d12c80a7d36837b6c586daa708ca09d7.1665033732.git.christophe.leroy@csgroup.eu


Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 30a0b95b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);