mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Miguel Gómez" <magomez@igalia.com>
To: gregkh@linuxfoundation.org, siglesias@igalia.com,
	dan.carpenter@oracle.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	"Miguel Gómez" <magomez@igalia.com>
Subject: [PATCH 2/9] Staging: ipack/bridges/tpci200: remove "out" label in tpci200_slot_map_space()
Date: Thu,  7 Jun 2012 10:24:51 +0200	[thread overview]
Message-ID: <1339057498-5256-2-git-send-email-magomez@igalia.com> (raw)
In-Reply-To: <1339057498-5256-1-git-send-email-magomez@igalia.com>

Remove the "out" label from tpci200_slot_map_space(), as it can directly return
the error code instead of jumping.

Signed-off-by: Miguel Gómez <magomez@igalia.com>
---
 drivers/staging/ipack/bridges/tpci200.c |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c
index 31f6b5d..3eaf387 100644
--- a/drivers/staging/ipack/bridges/tpci200.c
+++ b/drivers/staging/ipack/bridges/tpci200.c
@@ -625,15 +625,11 @@ static int tpci200_slot_map_space(struct ipack_device *dev,
 	struct tpci200_board *tpci200;
 
 	tpci200 = check_slot(dev);
-	if (tpci200 == NULL) {
-		res = -EINVAL;
-		goto out;
-	}
+	if (tpci200 == NULL)
+		return -EINVAL;
 
-	if (mutex_lock_interruptible(&tpci200->mutex)) {
-		res = -ERESTARTSYS;
-		goto out;
-	}
+	if (mutex_lock_interruptible(&tpci200->mutex))
+		return -ERESTARTSYS;
 
 	switch (space) {
 	case IPACK_IO_SPACE:
@@ -698,7 +694,6 @@ static int tpci200_slot_map_space(struct ipack_device *dev,
 
 out_unlock:
 	mutex_unlock(&tpci200->mutex);
-out:
 	return res;
 }
 
-- 
1.7.9.5


  reply	other threads:[~2012-06-07  8:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07  8:24 [PATCH 1/9] Staging: ipack/bridges/tpci200: remove gotos in tpci200_free_irq() Miguel Gómez
2012-06-07  8:24 ` Miguel Gómez [this message]
2012-06-07  8:24 ` [PATCH 3/9] Staging: ipack/bridges/tpci200: remove useless break in tpci200_slot_map_space() Miguel Gómez
2012-06-07  8:24 ` [PATCH 4/9] Staging: ipack/bridges/tpci200: remove "out" label in tpci200_request_irq() Miguel Gómez
2012-06-07  8:24 ` [PATCH 5/9] Staging: ipack/bridges/tpci200: remove gotos in tpci200_install() Miguel Gómez
2012-06-07  8:24 ` [PATCH 6/9] Staging: ipack/devices/ipoctal: remove ipoctal_config structure Miguel Gómez
2012-06-07  8:24 ` [PATCH 7/9] Staging: ipack/devices/ipoctal: remove error_flag field from ipoctal struct Miguel Gómez
2012-06-07  8:24 ` [PATCH 8/9] Staging: ipack/devices/ipoctal: remove unused enum uart_parity_e Miguel Gómez
2012-06-07  8:24 ` [PATCH 9/9] Staging: ipack/bridges/tpci200: change device table definition and export it Miguel Gómez
2012-06-07  8:39 ` [PATCH 1/9] Staging: ipack/bridges/tpci200: remove gotos in tpci200_free_irq() Dan Carpenter
2012-06-07  9:10 ` [PATCH v2 " Miguel Gómez

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=1339057498-5256-2-git-send-email-magomez@igalia.com \
    --to=magomez@igalia.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=siglesias@igalia.com \
    /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

all inboxes | Powered by JetHome®