Skip to content

Commit 5fbb0bc

Browse files
haraldgjic23
authored andcommitted
iio: dht11: avoid multiple assignments to make checkpatch.pl --strict happy
We just do the assignments in two steps. Signed-off-by: Harald Geyer <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent a712600 commit 5fbb0bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/iio/humidity/dht11.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,10 @@ static int dht11_probe(struct platform_device *pdev)
263263
dht11 = iio_priv(iio);
264264
dht11->dev = dev;
265265

266-
dht11->gpio = ret = of_get_gpio(node, 0);
266+
ret = of_get_gpio(node, 0);
267267
if (ret < 0)
268268
return ret;
269+
dht11->gpio = ret;
269270
ret = devm_gpio_request_one(dev, dht11->gpio, GPIOF_IN, pdev->name);
270271
if (ret)
271272
return ret;

0 commit comments

Comments
 (0)