Commit 5e41c998 authored by Zhen Lei's avatar Zhen Lei Committed by Joerg Roedel

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: default avatarZhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20210609124937.14260-1-thunder.leizhen@huawei.comSigned-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20210818134852.1847070-3-baolu.lu@linux.intel.comSigned-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 4d99efb2
...@@ -149,8 +149,6 @@ dmar_alloc_pci_notify_info(struct pci_dev *dev, unsigned long event) ...@@ -149,8 +149,6 @@ dmar_alloc_pci_notify_info(struct pci_dev *dev, unsigned long event)
} else { } else {
info = kzalloc(size, GFP_KERNEL); info = kzalloc(size, GFP_KERNEL);
if (!info) { if (!info) {
pr_warn("Out of memory when allocating notify_info "
"for %s.\n", pci_name(dev));
if (dmar_dev_scope_status == 0) if (dmar_dev_scope_status == 0)
dmar_dev_scope_status = -ENOMEM; dmar_dev_scope_status = -ENOMEM;
return NULL; return NULL;
......
...@@ -1779,11 +1779,8 @@ static int iommu_init_domains(struct intel_iommu *iommu) ...@@ -1779,11 +1779,8 @@ static int iommu_init_domains(struct intel_iommu *iommu)
spin_lock_init(&iommu->lock); spin_lock_init(&iommu->lock);
iommu->domain_ids = kcalloc(nlongs, sizeof(unsigned long), GFP_KERNEL); iommu->domain_ids = kcalloc(nlongs, sizeof(unsigned long), GFP_KERNEL);
if (!iommu->domain_ids) { if (!iommu->domain_ids)
pr_err("%s: Allocating domain id array failed\n",
iommu->name);
return -ENOMEM; return -ENOMEM;
}
size = (ALIGN(ndomains, 256) >> 8) * sizeof(struct dmar_domain **); size = (ALIGN(ndomains, 256) >> 8) * sizeof(struct dmar_domain **);
iommu->domains = kzalloc(size, GFP_KERNEL); iommu->domains = kzalloc(size, GFP_KERNEL);
...@@ -3224,7 +3221,6 @@ static int __init init_dmars(void) ...@@ -3224,7 +3221,6 @@ static int __init init_dmars(void)
g_iommus = kcalloc(g_num_of_iommus, sizeof(struct intel_iommu *), g_iommus = kcalloc(g_num_of_iommus, sizeof(struct intel_iommu *),
GFP_KERNEL); GFP_KERNEL);
if (!g_iommus) { if (!g_iommus) {
pr_err("Allocating global iommu array failed\n");
ret = -ENOMEM; ret = -ENOMEM;
goto error; goto error;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment