iio: stmpe-adc: Remove unnecessary assignment
authorPhilippe Schenker <philippe.schenker@toradex.com>
Fri, 3 May 2019 13:57:23 +0000 (15:57 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 5 May 2019 15:38:01 +0000 (16:38 +0100)
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@toradex.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/stmpe-adc.c

index 7921f82..c018069 100644 (file)
@@ -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);