linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/6] staging: vchiq_arm: Delete an error message for a failed memory allocation in dump_phys_mem()
Date: Sat, 31 Dec 2016 23:03:16 +0100	[thread overview]
Message-ID: <20128727-5313-ad6d-7938-ca9c303331a7@users.sourceforge.net> (raw)
In-Reply-To: <5acd65e7-0b5d-0972-5e1a-6e87d71dc1a4@users.sourceforge.net>

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(&current->mm->mmap_sem);
 	rc = get_user_pages(
-- 
2.11.0

  parent reply	other threads:[~2016-12-31 22:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-31 21:54 [PATCH 0/6] staging: vchiq_arm: Fine-tuning for some function implementations SF Markus Elfring
2016-12-31 21:58 ` [PATCH 1/6] staging: vchiq_arm: Use kmalloc_array() in dump_phys_mem() SF Markus Elfring
2016-12-31 22:00 ` [PATCH 2/6] staging: vchiq_arm: Adjust 13 checks for null pointers SF Markus Elfring
2016-12-31 22:01 ` [PATCH 3/6] staging: vchiq_arm: One check less in dump_phys_mem() after error detection SF Markus Elfring
2016-12-31 22:03 ` SF Markus Elfring [this message]
2016-12-31 22:04 ` [PATCH 5/6] staging: vchiq_arm: Combine substrings for 24 messages SF Markus Elfring
2016-12-31 22:06 ` [PATCH 6/6] staging: vchiq_arm: Delete an unnecessary return statement in two functions SF Markus Elfring
2017-01-03 17:46 ` [PATCH 0/6] staging: vchiq_arm: Fine-tuning for some function implementations Eric Anholt
2017-01-03 18:30   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20128727-5313-ad6d-7938-ca9c303331a7@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).