linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hartmut Knaack <knaack.h@gmx.de>
To: linux-iio@vger.kernel.org
Cc: Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Subject: [PATCH 4/6] iio:dac:m62332: drop unrequired variable
Date: Fri, 28 Aug 2015 23:59:56 +0200	[thread overview]
Message-ID: <9a834bd03fd40333cb6e9935e51ecf801c81d38b.1440459082.git.knaack.h@gmx.de> (raw)
In-Reply-To: <cover.1440459082.git.knaack.h@gmx.de>
In-Reply-To: <cover.1440459082.git.knaack.h@gmx.de>

A return variable is not required in _write_raw(), and dropping it reduces
complexity, as well.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
---
 drivers/iio/dac/m62332.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/iio/dac/m62332.c b/drivers/iio/dac/m62332.c
index fe750982b502..1b65fc007bce 100644
--- a/drivers/iio/dac/m62332.c
+++ b/drivers/iio/dac/m62332.c
@@ -112,21 +112,17 @@ static int m62332_read_raw(struct iio_dev *indio_dev,
 static int m62332_write_raw(struct iio_dev *indio_dev,
 	struct iio_chan_spec const *chan, int val, int val2, long mask)
 {
-	int ret;
-
 	switch (mask) {
 	case IIO_CHAN_INFO_RAW:
 		if (val < 0 || val > 255)
 			return -EINVAL;
 
-		ret = m62332_set_value(indio_dev, val, chan->channel);
-		break;
+		return m62332_set_value(indio_dev, val, chan->channel);
 	default:
-		ret = -EINVAL;
 		break;
 	}
 
-	return ret;
+	return -EINVAL;
 }
 
 #ifdef CONFIG_PM_SLEEP
-- 
2.4.6


  parent reply	other threads:[~2015-08-28 22:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-28 21:59 [PATCH 0/6] fixes, cleanup and improvements for m62332 Hartmut Knaack
2015-08-28 21:59 ` [PATCH 1/6] iio:dac:m62332: share scale and offset Hartmut Knaack
2015-08-31 14:53   ` Jonathan Cameron
2015-09-12 10:11     ` Jonathan Cameron
2015-09-12 10:14       ` Jonathan Cameron
2015-09-27 15:56         ` Jonathan Cameron
2015-10-11 14:40   ` Jonathan Cameron
2015-08-28 21:59 ` [PATCH 2/6] iio:dac:m62332: shutdown on remove Hartmut Knaack
2015-08-31 12:56   ` Daniel Baluta
2015-08-31 19:26     ` Hartmut Knaack
2015-10-11 14:42     ` Jonathan Cameron
2015-08-28 21:59 ` [PATCH 3/6] iio:dac:m62332: use ARRAY_SIZE Hartmut Knaack
2015-08-31 12:58   ` Daniel Baluta
2015-10-11 14:43     ` Jonathan Cameron
2015-08-28 21:59 ` Hartmut Knaack [this message]
2015-08-31 19:46   ` [PATCH 4/6] iio:dac:m62332: drop unrequired variable Daniel Baluta
2015-10-11 14:44     ` Jonathan Cameron
2015-08-28 21:59 ` [PATCH 5/6] iio:dac:m62332: address some style issues Hartmut Knaack
2015-10-11 14:45   ` Jonathan Cameron
2015-08-28 21:59 ` [PATCH 6/6] iio:dac:m62332: use dynamic scale Hartmut Knaack
2015-10-11 14:46   ` Jonathan Cameron
2015-08-31 15:00 ` [PATCH 0/6] fixes, cleanup and improvements for m62332 Jonathan Cameron
2015-08-31 16:09   ` Dmitry Eremin-Solenikov
2015-09-12 10:13     ` Jonathan Cameron
2015-10-03 11:16       ` Jonathan Cameron
2015-10-11 14:38         ` Jonathan Cameron

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=9a834bd03fd40333cb6e9935e51ecf801c81d38b.1440459082.git.knaack.h@gmx.de \
    --to=knaack.h@gmx.de \
    --cc=dbaryshkov@gmail.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --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 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).