summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorkbuild test robot <fengguang.wu@intel.com>2015-09-22 05:16:48 +0300
committerJonathan Cameron <jic23@kernel.org>2015-09-23 22:23:28 +0300
commit36736cc66bcedcd25b65faff43e352491409971f (patch)
tree9957d188fc1f7dabe96b4b3d5445e54a2913309e /drivers/iio
parent9214185b515ed550fe67c912ca446b4524f01603 (diff)
downloadlinux-36736cc66bcedcd25b65faff43e352491409971f.tar.xz
iio: adc: vf610: fix simple_return.cocci warnings
drivers/iio/adc/vf610_adc.c:766:1-4: WARNING: end returns can be simpified and declaration on line 755 can be dropped Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci CC: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/adc/vf610_adc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/iio/adc/vf610_adc.c b/drivers/iio/adc/vf610_adc.c
index 635ccd86620e..599cde3d03a1 100644
--- a/drivers/iio/adc/vf610_adc.c
+++ b/drivers/iio/adc/vf610_adc.c
@@ -752,7 +752,7 @@ static int vf610_adc_buffer_predisable(struct iio_dev *indio_dev)
{
struct vf610_adc *info = iio_priv(indio_dev);
unsigned int hc_cfg = 0;
- int val, ret;
+ int val;
val = readl(info->regs + VF610_REG_ADC_GC);
val &= ~VF610_ADC_ADCON;
@@ -763,11 +763,7 @@ static int vf610_adc_buffer_predisable(struct iio_dev *indio_dev)
writel(hc_cfg, info->regs + VF610_REG_ADC_HC0);
- ret = iio_triggered_buffer_predisable(indio_dev);
- if (ret)
- return ret;
-
- return 0;
+ return iio_triggered_buffer_predisable(indio_dev);
}
static const struct iio_buffer_setup_ops iio_triggered_buffer_setup_ops = {