[PATCH] iommu/arm-smmu: Remove dev_err_probe() if error is -ENOMEM

From: Xichao Zhao
Date: Thu Aug 21 2025 - 05:48:48 EST


The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@xxxxxxxx>
---
drivers/iommu/arm/arm-smmu/arm-smmu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c
index 4ced4b5bee4d..9e441f3a75d5 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c
@@ -2164,8 +2164,7 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
smmu->irqs = devm_kcalloc(dev, smmu->num_context_irqs,
sizeof(*smmu->irqs), GFP_KERNEL);
if (!smmu->irqs)
- return dev_err_probe(dev, -ENOMEM, "failed to allocate %d irqs\n",
- smmu->num_context_irqs);
+ return -ENOMEM;

for (i = 0; i < smmu->num_context_irqs; i++) {
int irq = platform_get_irq(pdev, global_irqs + pmu_irqs + i);
--
2.34.1