提交 d6bb4ec3 编写于 作者: M Markus Elfring 提交者: Stefano Stabellini

arm/xen: Delete an error message for a failed memory allocation in __set_phys_to_machine_multi()

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdfSigned-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-by: NStefano Stabellini <sstabellini@kernel.org>
上级 031229b8
......@@ -145,10 +145,9 @@ bool __set_phys_to_machine_multi(unsigned long pfn,
}
p2m_entry = kzalloc(sizeof(*p2m_entry), GFP_NOWAIT);
if (!p2m_entry) {
pr_warn("cannot allocate xen_p2m_entry\n");
if (!p2m_entry)
return false;
}
p2m_entry->pfn = pfn;
p2m_entry->nr_pages = nr_pages;
p2m_entry->mfn = mfn;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册