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 3/6] staging: vchiq_arm: One check less in dump_phys_mem() after error detection
Date: Sat, 31 Dec 2016 23:01:27 +0100	[thread overview]
Message-ID: <7b97ce90-64c9-7327-9e03-1e22bf7d7f53@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:26:09 +0100

Adjust a jump target according to the Linux coding style convention
so that a redundant check for a null pointer can be avoided
in this function.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 5 ++---
 1 file changed, 2 insertions(+), 3 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 2a260034189d..a316cf9ac626 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -1581,7 +1581,7 @@ dump_phys_mem(void *virt_addr, uint32_t num_bytes)
 	if (rc < 0) {
 		vchiq_log_error(vchiq_arm_log_level,
 				"Failed to get user pages: %d\n", rc);
-		goto out;
+		goto put_pages;
 	}
 
 	while (offset < end_offset) {
@@ -1607,10 +1607,9 @@ dump_phys_mem(void *virt_addr, uint32_t num_bytes)
 		offset += 16;
 	}
 
-out:
 	if (page)
 		kunmap(page);
-
+put_pages:
 	for (page_idx = 0; page_idx < num_pages; page_idx++)
 		put_page(pages[page_idx]);
 
-- 
2.11.0

  parent reply	other threads:[~2016-12-31 22:01 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 ` SF Markus Elfring [this message]
2016-12-31 22:03 ` [PATCH 4/6] staging: vchiq_arm: Delete an error message for a failed memory allocation in dump_phys_mem() SF Markus Elfring
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=7b97ce90-64c9-7327-9e03-1e22bf7d7f53@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).