drivers/iommu/arm/arm-smmu/arm-smmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
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@vivo.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
On Thu, Aug 21, 2025 at 2:48 AM Xichao Zhao <zhao.xichao@vivo.com> wrote:
>
> 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.
You could mention the following commit which I believe changed the
-ENOMEM behavior.
2f3cfd2f4b7c ("driver core: Make dev_err_probe() silent for -ENOMEM")
On Tue, Aug 26, 2025 at 09:39:26AM -0700, Daniel Mentz wrote:
> On Thu, Aug 21, 2025 at 2:48 AM Xichao Zhao <zhao.xichao@vivo.com> wrote:
> >
> > 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.
>
> You could mention the following commit which I believe changed the
> -ENOMEM behavior.
>
> 2f3cfd2f4b7c ("driver core: Make dev_err_probe() silent for -ENOMEM")
Hmm, right, and now we lost the message about interrupts altogether so,
if anything, I'd be inclined to go back to the old behaviour prior to
97dfad194ca8 ("iommu/arm-smmu: Account for PMU interrupts") using
dev_err() and return -ENOMEM explicitly.
Will
© 2016 - 2026 Red Hat, Inc.