On Fri, 3 May 2019 15:57:23 +0200 Philippe Schenker <dev@xxxxxxxxxxxx> wrote: > From: Philippe Schenker <philippe.schenker@xxxxxxxxxxx> > > Remove unnecessary assignment. This could potentially cause an issue, if > the wait function runs into a timeout. Furthermore is this assignment also > not there in stmpe_read_temp() > > Signed-off-by: Philippe Schenker <philippe.schenker@xxxxxxxxxxx> This would probably have benefited from a statement that *val is set twice currently. Good find. Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > --- > > drivers/iio/adc/stmpe-adc.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/iio/adc/stmpe-adc.c b/drivers/iio/adc/stmpe-adc.c > index 37f4b74a5d32..87141177fbda 100644 > --- a/drivers/iio/adc/stmpe-adc.c > +++ b/drivers/iio/adc/stmpe-adc.c > @@ -78,8 +78,6 @@ static int stmpe_read_voltage(struct stmpe_adc *info, > stmpe_reg_write(info->stmpe, STMPE_REG_ADC_CAPT, > STMPE_ADC_CH(info->channel)); > > - *val = info->value; > - > ret = wait_for_completion_interruptible_timeout > (&info->completion, STMPE_ADC_TIMEOUT); >