All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: jbrenner@taosinc.com, amit.kucheria@verdurent.com,
	pmeerw@pmeerw.net, Jonathan Cameron <jic23@kernel.org>
Subject: [PATCH 3/5] staging:iio:tsl2563 Simplify exit path on error in read_interrupt_config.
Date: Sat, 12 Jan 2013 10:35:22 +0000	[thread overview]
Message-ID: <1357986924-11471-4-git-send-email-jic23@kernel.org> (raw)
In-Reply-To: <1357986924-11471-1-git-send-email-jic23@kernel.org>

A rather over complicated exit path given there is only one exit
route and nothing much is done after it.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
---
 drivers/staging/iio/light/tsl2563.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/iio/light/tsl2563.c b/drivers/staging/iio/light/tsl2563.c
index 547203c..1a3092a 100644
--- a/drivers/staging/iio/light/tsl2563.c
+++ b/drivers/staging/iio/light/tsl2563.c
@@ -672,11 +672,9 @@ static int tsl2563_read_interrupt_config(struct iio_dev *indio_dev,
 				       TSL2563_CMD | TSL2563_REG_INT);
 	mutex_unlock(&chip->lock);
 	if (ret < 0)
-		goto error_ret;
-	ret = !!(ret & 0x30);
-error_ret:
+		return ret;
 
-	return ret;
+	return !!(ret & 0x30);
 }
 
 static struct i2c_driver tsl2563_i2c_driver;
-- 
1.8.1

  parent reply	other threads:[~2013-01-12 10:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-12 10:35 [PATCH 0/5] iio:light:tsl2563 cleanup and move out of staging Jonathan Cameron
2013-01-12 10:35 ` [PATCH 1/5] staging:iio:light:tsl2563 drop unnecessary brackets around constants Jonathan Cameron
2013-01-12 10:35 ` [PATCH 2/5] staging:iio:light:tsl2563 clean comments up Jonathan Cameron
2013-01-12 10:35 ` Jonathan Cameron [this message]
2013-01-12 10:35 ` [PATCH 4/5] staging:iio:tsl2563 drop pointless forward declaration Jonathan Cameron
2013-01-12 10:35 ` [PATCH 5/5] iio:light:tsl2563 move out of staging Jonathan Cameron
2013-01-20 13:32   ` Peter Meerwald
2013-01-20 21:45     ` Jonathan Cameron
2013-01-26 10:40       ` Jonathan Cameron
2013-01-20 12:09 ` [PATCH 0/5] iio:light:tsl2563 cleanup and " Jonathan Cameron
2013-01-20 13:34   ` Peter Meerwald

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=1357986924-11471-4-git-send-email-jic23@kernel.org \
    --to=jic23@kernel.org \
    --cc=amit.kucheria@verdurent.com \
    --cc=jbrenner@taosinc.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.