Skip to content

Commit ec37d4e

Browse files
geertujoergroedel
authored andcommitted
iommu/ipmmu-vmsa: Only call platform_get_irq() when interrupt is mandatory
As platform_get_irq() now prints an error when the interrupt does not exist, calling it gratuitously causes scary messages like: ipmmu-vmsa e6740000.mmu: IRQ index 0 not found Fix this by moving the call to platform_get_irq() down, where the existence of the interrupt is mandatory. Fixes: 7723f4c ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Yoshihiro Shimoda <[email protected]> Tested-by: Yoshihiro Shimoda <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent f925815 commit ec37d4e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/iommu/ipmmu-vmsa.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,8 +1086,6 @@ static int ipmmu_probe(struct platform_device *pdev)
10861086

10871087
mmu->num_ctx = min(IPMMU_CTX_MAX, mmu->features->number_of_contexts);
10881088

1089-
irq = platform_get_irq(pdev, 0);
1090-
10911089
/*
10921090
* Determine if this IPMMU instance is a root device by checking for
10931091
* the lack of has_cache_leaf_nodes flag or renesas,ipmmu-main property.
@@ -1106,6 +1104,7 @@ static int ipmmu_probe(struct platform_device *pdev)
11061104

11071105
/* Root devices have mandatory IRQs */
11081106
if (ipmmu_is_root(mmu)) {
1107+
irq = platform_get_irq(pdev, 0);
11091108
if (irq < 0) {
11101109
dev_err(&pdev->dev, "no IRQ found\n");
11111110
return irq;

0 commit comments

Comments
 (0)