Skip to content

Commit

Permalink
iio: dht11: avoid multiple assignments to make checkpatch.pl --strict…
Browse files Browse the repository at this point in the history
… happy

We just do the assignments in two steps.

Signed-off-by: Harald Geyer <harald@ccbib.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Harald Geyer authored and Jonathan Cameron committed Jul 20, 2015
1 parent a712600 commit 5fbb0bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/iio/humidity/dht11.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5fbb0bc

Please sign in to comment.