diff mbox series

[08/10] xen/arm: smmuv3: Remove unnecessary oom message

Message ID f9314c330d4ac0690bc648708f03a6a7b554099d.1661331102.git.rahul.singh@arm.com (mailing list archive)
State Superseded
Headers show
Series xen/arm: smmuv3: Merge Linux fixes to Xen | expand

Commit Message

Rahul Singh Aug. 24, 2022, 1:53 p.m. UTC
Backport Linux commit affa909571b0036b5d46aeff940ad4358f4abe1d
"iommu/arm-smmu-v3: Remove unnecessary oom message"

Original commit message:
    iommu/arm-smmu-v3: Remove unnecessary oom message

    Fixes scripts/checkpatch.pl warning:
    WARNING: Possible unnecessary 'out of memory' message

    Remove it can help us save a bit of memory.

    Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
    Link: https://lore.kernel.org/r/20210609125438.14369-1-thunder.leizhen@huawei.com
    Signed-off-by: Will Deacon <will@kernel.org>

Signed-off-by: Rahul Singh <rahul.singh@arm.com>
---
 xen/drivers/passthrough/arm/smmu-v3.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/xen/drivers/passthrough/arm/smmu-v3.c b/xen/drivers/passthrough/arm/smmu-v3.c
index 0ade8f51c6..df39b8ae37 100644
--- a/xen/drivers/passthrough/arm/smmu-v3.c
+++ b/xen/drivers/passthrough/arm/smmu-v3.c
@@ -1932,10 +1932,8 @@  static int arm_smmu_init_l1_strtab(struct arm_smmu_device *smmu)
 	void *strtab = smmu->strtab_cfg.strtab;
 
 	cfg->l1_desc = _xzalloc(size, sizeof(void *));
-	if (!cfg->l1_desc) {
-		dev_err(smmu->dev, "failed to allocate l1 stream table desc\n");
+	if (!cfg->l1_desc)
 		return -ENOMEM;
-	}
 
 	for (i = 0; i < cfg->num_l1_ents; ++i) {
 		arm_smmu_write_strtab_l1_desc(strtab, &cfg->l1_desc[i]);
@@ -2720,10 +2718,8 @@  static int arm_smmu_device_probe(struct platform_device *pdev)
 	struct arm_smmu_device *smmu;
 
 	smmu = xzalloc(struct arm_smmu_device);
-	if (!smmu) {
-		dev_err(pdev, "failed to allocate arm_smmu_device\n");
+	if (!smmu)
 		return -ENOMEM;
-	}
 	smmu->dev = pdev;
 
 	if (pdev->of_node) {