Re: [PATCHv3 3/4] iio: dht11: avoid multiple assignments to make checkpatch.pl --strict happy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/07/15 14:39, Harald Geyer wrote:
> We just do the assignments in two steps.
> 
> Signed-off-by: Harald Geyer <harald@xxxxxxxxx>
Applied to the togreg branch of iio.git.

Thanks,

Jonathan
> ---
>  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;
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux