[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250821094717.573232-1-zhao.xichao@vivo.com>
Date: Thu, 21 Aug 2025 17:47:17 +0800
From: Xichao Zhao <zhao.xichao@...o.com>
To: will@...nel.org,
joro@...tes.org
Cc: robin.murphy@....com,
iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Xichao Zhao <zhao.xichao@...o.com>
Subject: [PATCH] iommu/arm-smmu: Remove dev_err_probe() if error is -ENOMEM
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@...o.com>
---
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
Powered by blists - more mailing lists