From: Sachin Kamat Date: Thu, 24 Oct 2013 11:53:00 +0000 (+0100) Subject: iio: adc: twl6030-gpadc: Remove redundant code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ae0f29d1593fabb8eade5f93352e05f88f6245bd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Jonathan Cameron --- 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) 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)