All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harald Geyer <harald@ccbib.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, Richard Weinberger <richard@nod.at>,
	Jonathan Bell <jonathan@raspberrypi.org>,
	Hartmut Knaack <knaack.h@gmx.de>, Harald Geyer <harald@ccbib.org>
Subject: [PATCHv3 3/4] iio: dht11: avoid multiple assignments to make checkpatch.pl --strict happy
Date: Tue,  7 Jul 2015 13:39:30 +0000	[thread overview]
Message-ID: <1436276371-7480-3-git-send-email-harald@ccbib.org> (raw)
In-Reply-To: <1436276371-7480-1-git-send-email-harald@ccbib.org>

We just do the assignments in two steps.

Signed-off-by: Harald Geyer <harald@ccbib.org>
---
 drivers/iio/humidity/dht11.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/humidity/dht11.c b/drivers/iio/humidity/dht11.c
index bb5ad57..91976e0 100644
--- a/drivers/iio/humidity/dht11.c
+++ b/drivers/iio/humidity/dht11.c
@@ -263,9 +263,10 @@ static int dht11_probe(struct platform_device *pdev)
 	dht11 = iio_priv(iio);
 	dht11->dev = dev;
 
-	dht11->gpio = ret = of_get_gpio(node, 0);
+	ret = of_get_gpio(node, 0);
 	if (ret < 0)
 		return ret;
+	dht11->gpio = ret;
 	ret = devm_gpio_request_one(dev, dht11->gpio, GPIOF_IN, pdev->name);
 	if (ret)
 		return ret;
-- 
1.7.10.4

  parent reply	other threads:[~2015-07-07 13:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-07 11:12 [PATCHv2 0/2] Provide new API to get the current time resolution Harald Geyer
2015-04-07 11:12 ` [PATCHv2 1/2] timekeeping: " Harald Geyer
2015-04-07 22:30   ` Richard Weinberger
2015-04-08  7:21     ` Richard Weinberger
2015-04-07 11:12 ` [PATCHv2 2/2] iio: dht11: Use new function ktime_get_resolution_ns() Harald Geyer
2015-04-09 13:13   ` Jonathan Cameron
2015-06-29 18:59     ` Harald Geyer
2015-06-29 19:37       ` Hartmut Knaack
2015-06-30 19:37         ` harald
2015-06-30 19:39           ` Richard Weinberger
2015-07-01 19:04           ` Hartmut Knaack
2015-07-05 12:15           ` Jonathan Cameron
2015-07-06 15:06             ` harald
2015-07-07 13:39             ` [PATCHv3 1/4] iio: dht11: whitespace changes to make checkpatch.pl --strict happy Harald Geyer
2015-07-07 13:39               ` [PATCHv3 2/4] iio: dht11: add comment " Harald Geyer
2015-07-19 13:06                 ` Jonathan Cameron
2015-07-07 13:39               ` Harald Geyer [this message]
2015-07-19 13:08                 ` [PATCHv3 3/4] iio: dht11: avoid multiple assignments " Jonathan Cameron
2015-07-07 13:39               ` [PATCHv3 4/4] iio: dht11: Use new function ktime_get_resolution_ns() Harald Geyer
2015-07-19 13:10                 ` Jonathan Cameron
2015-07-19 13:04               ` [PATCHv3 1/4] iio: dht11: whitespace changes to make checkpatch.pl --strict happy 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=1436276371-7480-3-git-send-email-harald@ccbib.org \
    --to=harald@ccbib.org \
    --cc=jic23@kernel.org \
    --cc=jonathan@raspberrypi.org \
    --cc=knaack.h@gmx.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=richard@nod.at \
    /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.