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>
{
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;
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 = {