diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-10-24 07:53:00 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-10-24 09:45:09 -0400 |
commit | ae0f29d1593fabb8eade5f93352e05f88f6245bd (patch) | |
tree | e03f5874132160c7657f665ce127dd5b1eb6bfb3 /drivers/iio/adc | |
parent | dcf5272cac4115bfd52afd30e9a8ba5fb9c8d449 (diff) |
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: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r-- | drivers/iio/adc/twl6030-gpadc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c index 2edfc7bd4f63..53e1c645cee7 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) | |||
948 | indio_dev->channels = pdata->iio_channels; | 948 | indio_dev->channels = pdata->iio_channels; |
949 | indio_dev->num_channels = pdata->nchannels; | 949 | indio_dev->num_channels = pdata->nchannels; |
950 | 950 | ||
951 | ret = iio_device_register(indio_dev); | 951 | return iio_device_register(indio_dev); |
952 | |||
953 | return ret; | ||
954 | } | 952 | } |
955 | 953 | ||
956 | static int twl6030_gpadc_remove(struct platform_device *pdev) | 954 | static int twl6030_gpadc_remove(struct platform_device *pdev) |