Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: adc: cpcap-adc: remove redundant assignment to variable cal_data_diff

The variable cal_data_diff is being assigned a value that is never read,
it is being re-assigned later on with a new value in both paths of an
if statement. The assignment is redundant, so remove it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220207135943.340629-1-colin.i.king@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Colin Ian King and committed by
Jonathan Cameron
342c6c5e 889bdfc3

+1 -1
+1 -1
drivers/iio/adc/cpcap-adc.c
··· 474 474 for (i = 0; i < CPCAP_ADC_MAX_RETRIES; i++) { 475 475 calibration_data[0] = 0; 476 476 calibration_data[1] = 0; 477 - cal_data_diff = 0; 477 + 478 478 cpcap_adc_setup_calibrate(ddata, channel); 479 479 error = regmap_read(ddata->reg, calibration_register, 480 480 &calibration_data[0]);