Skip to content

Commit 5e41c99

Browse files
Zhen Leijoergroedel
authored andcommitted
iommu/vt-d: 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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lu Baolu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 4d99efb commit 5e41c99

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

drivers/iommu/intel/dmar.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ dmar_alloc_pci_notify_info(struct pci_dev *dev, unsigned long event)
149149
} else {
150150
info = kzalloc(size, GFP_KERNEL);
151151
if (!info) {
152-
pr_warn("Out of memory when allocating notify_info "
153-
"for %s.\n", pci_name(dev));
154152
if (dmar_dev_scope_status == 0)
155153
dmar_dev_scope_status = -ENOMEM;
156154
return NULL;

drivers/iommu/intel/iommu.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,11 +1779,8 @@ static int iommu_init_domains(struct intel_iommu *iommu)
17791779
spin_lock_init(&iommu->lock);
17801780

17811781
iommu->domain_ids = kcalloc(nlongs, sizeof(unsigned long), GFP_KERNEL);
1782-
if (!iommu->domain_ids) {
1783-
pr_err("%s: Allocating domain id array failed\n",
1784-
iommu->name);
1782+
if (!iommu->domain_ids)
17851783
return -ENOMEM;
1786-
}
17871784

17881785
size = (ALIGN(ndomains, 256) >> 8) * sizeof(struct dmar_domain **);
17891786
iommu->domains = kzalloc(size, GFP_KERNEL);
@@ -3224,7 +3221,6 @@ static int __init init_dmars(void)
32243221
g_iommus = kcalloc(g_num_of_iommus, sizeof(struct intel_iommu *),
32253222
GFP_KERNEL);
32263223
if (!g_iommus) {
3227-
pr_err("Allocating global iommu array failed\n");
32283224
ret = -ENOMEM;
32293225
goto error;
32303226
}

0 commit comments

Comments
 (0)