Commit ae0f29d1 authored by Sachin Kamat's avatar Sachin Kamat Committed by Jonathan Cameron

iio: adc: twl6030-gpadc: Remove redundant code

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: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent dcf5272c
...@@ -948,9 +948,7 @@ static int twl6030_gpadc_probe(struct platform_device *pdev) ...@@ -948,9 +948,7 @@ static int twl6030_gpadc_probe(struct platform_device *pdev)
indio_dev->channels = pdata->iio_channels; indio_dev->channels = pdata->iio_channels;
indio_dev->num_channels = pdata->nchannels; indio_dev->num_channels = pdata->nchannels;
ret = iio_device_register(indio_dev); return iio_device_register(indio_dev);
return ret;
} }
static int twl6030_gpadc_remove(struct platform_device *pdev) static int twl6030_gpadc_remove(struct platform_device *pdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment