iommu/arm-smmu-v3: Remove unnecessary oom message
authorZhen Lei <thunder.leizhen@huawei.com>
Wed, 9 Jun 2021 12:54:38 +0000 (20:54 +0800)
committerWill Deacon <will@kernel.org>
Tue, 15 Jun 2021 18:33:06 +0000 (19:33 +0100)
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>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

index 141cb7d..4562214 100644 (file)
@@ -2967,10 +2967,8 @@ static int arm_smmu_init_l1_strtab(struct arm_smmu_device *smmu)
        void *strtab = smmu->strtab_cfg.strtab;
 
        cfg->l1_desc = devm_kzalloc(smmu->dev, size, GFP_KERNEL);
-       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]);
@@ -3761,10 +3759,8 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
        bool bypass;
 
        smmu = devm_kzalloc(dev, sizeof(*smmu), GFP_KERNEL);
-       if (!smmu) {
-               dev_err(dev, "failed to allocate arm_smmu_device\n");
+       if (!smmu)
                return -ENOMEM;
-       }
        smmu->dev = dev;
 
        if (dev->of_node) {