diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-06-04 21:12:36 +0200 |
---|---|---|
committer | Stefano Stabellini <sstabellini@kernel.org> | 2017-06-05 19:38:07 +0200 |
commit | d6bb4ec32c832fb0fcc43636327e17a0724e2324 (patch) | |
tree | 8d0dc9cbdbe5288c5dfb6e75bdda91e2cdb50e2a /arch/arm/xen/p2m.c | |
parent | arm/xen: Improve a size determination in __set_phys_to_machine_multi() (diff) | |
download | linux-d6bb4ec32c832fb0fcc43636327e17a0724e2324.tar.xz linux-d6bb4ec32c832fb0fcc43636327e17a0724e2324.zip |
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.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Diffstat (limited to 'arch/arm/xen/p2m.c')
-rw-r--r-- | arch/arm/xen/p2m.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/xen/p2m.c b/arch/arm/xen/p2m.c index 11e78432b663..f5f74ac637b9 100644 --- a/arch/arm/xen/p2m.c +++ b/arch/arm/xen/p2m.c @@ -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; |