iio: adc: twl6030-gpadc: Remove redundant code
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 24 Oct 2013 11:53:00 +0000 (12:53 +0100)
committerJonathan Cameron <jic23@kernel.org>
Thu, 24 Oct 2013 13:45:09 +0000 (14:45 +0100)
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@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/twl6030-gpadc.c

index 2edfc7b..53e1c64 100644 (file)
@@ -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)