Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1548838
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/6] staging: vchiq_arm: Delete an error message for a failed memory allocation in dump_phys_mem() |
| Date | 2016-12-31 23:10 +0100 |
| Message-ID | <sUA0F-eE-1@gated-at.bofh.it> (permalink) |
| References | <sUzQZ-8nq-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 31 Dec 2016 21:30:31 +0100
Omit an extra message for a memory allocation failure in this function.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index a316cf9ac626..3b7a0c87954d 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -1559,12 +1559,8 @@ dump_phys_mem(void *virt_addr, uint32_t num_bytes)
num_pages = (offset + num_bytes + PAGE_SIZE - 1) / PAGE_SIZE;
pages = kmalloc_array(num_pages, sizeof(*pages), GFP_KERNEL);
- if (!pages) {
- vchiq_log_error(vchiq_arm_log_level,
- "Unable to allocation memory for %d pages\n",
- num_pages);
+ if (!pages)
return;
- }
down_read(¤t->mm->mmap_sem);
rc = get_user_pages(
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6] staging: vchiq_arm: Fine-tuning for some function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-12-31 23:00 +0100 [PATCH 6/6] staging: vchiq_arm: Delete an unnecessary return statement in two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2016-12-31 23:10 +0100 [PATCH 3/6] staging: vchiq_arm: One check less in dump_phys_mem() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2016-12-31 23:10 +0100 [PATCH 4/6] staging: vchiq_arm: Delete an error message for a failed memory allocation in dump_phys_mem() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-12-31 23:10 +0100 [PATCH 2/6] staging: vchiq_arm: Adjust 13 checks for null pointers SF Markus Elfring <elfring@users.sourceforge.net> - 2016-12-31 23:10 +0100 [PATCH 5/6] staging: vchiq_arm: Combine substrings for 24 messages SF Markus Elfring <elfring@users.sourceforge.net> - 2016-12-31 23:10 +0100
csiph-web