diff mbox series

[2/2] iommu/arm-smmu: Propagate errors from platform_get_irq()

Message ID 20211223130046.9365-3-prabhakar.mahadev-lad.rj@bp.renesas.com (mailing list archive)
State New, archived
Headers show
Series iommu/arm-smmu: Use platform_irq_count() | expand

Commit Message

Prabhakar Dec. 23, 2021, 1 p.m. UTC
The driver overrides the error code returned by platform_get_irq() to
-ENODEV. Switch to propagating the error code upstream so that errors
such as -EPROBE_DEFER are handled.

Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
 drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Robin Murphy Dec. 23, 2021, 2:19 p.m. UTC | #1
On 2021-12-23 13:00, Lad Prabhakar wrote:
> The driver overrides the error code returned by platform_get_irq() to
> -ENODEV. Switch to propagating the error code upstream so that errors
> such as -EPROBE_DEFER are handled.

I wouldn't usually expect an SMMU to be wired up to a secondary 
interrupt controller that could cause deferral, but on the other hand I 
don't think there's any good reason *not* to propagate the original 
error anyway, so sure, why not.

Reviewed-by: Robin Murphy <robin.murphy@arm.com>

> Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
>   drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c
> index 4844cd075644..6cf5612efcda 100644
> --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c
> +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c
> @@ -2129,7 +2129,7 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
>   		int irq = platform_get_irq(pdev, i);
>   
>   		if (irq < 0)
> -			return -ENODEV;
> +			return irq;
>   		smmu->irqs[i] = irq;
>   	}
>
diff mbox series

Patch

diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c
index 4844cd075644..6cf5612efcda 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c
@@ -2129,7 +2129,7 @@  static int arm_smmu_device_probe(struct platform_device *pdev)
 		int irq = platform_get_irq(pdev, i);
 
 		if (irq < 0)
-			return -ENODEV;
+			return irq;
 		smmu->irqs[i] = irq;
 	}