Re: [PATCH 4/9] iio: adc: twl6030-gpadc: Remove redundant code

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

 



On 10/24/13 12:53, Sachin Kamat wrote:
> The if check is redundant as the value obtained from
> iio_device_register() is already in the required format.
> Hence return the function directly.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx>
Applied
> ---
>  drivers/iio/adc/twl6030-gpadc.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c
> index 0ea96c0..5d13f8b 100644
> --- a/drivers/iio/adc/twl6030-gpadc.c
> +++ b/drivers/iio/adc/twl6030-gpadc.c
> @@ -948,9 +948,7 @@ static int twl6030_gpadc_probe(struct platform_device *pdev)
>  	indio_dev->channels = pdata->iio_channels;
>  	indio_dev->num_channels = pdata->nchannels;
>  
> -	ret = iio_device_register(indio_dev);
> -
> -	return ret;
> +	return iio_device_register(indio_dev);
>  }
>  
>  static int twl6030_gpadc_remove(struct platform_device *pdev)
> 
--
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