summaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/npcm_adc.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2019-05-20 09:15:14 +0200
committerGreg Kroah-Hartman2019-05-20 09:15:14 +0200
commit083a685c2ee035dd6c47242ea2de6d9eed3bf929 (patch)
treeb50c0e89fa21c9bb3a23e1afa31c257d819117b6 /drivers/iio/adc/npcm_adc.c
parentLinux 5.2-rc1 (diff)
parentiio: adc: ti-ads8688: fix timestamp is not updated in buffer (diff)
downloadkernel-qcow2-linux-083a685c2ee035dd6c47242ea2de6d9eed3bf929.tar.gz
kernel-qcow2-linux-083a685c2ee035dd6c47242ea2de6d9eed3bf929.tar.xz
kernel-qcow2-linux-083a685c2ee035dd6c47242ea2de6d9eed3bf929.zip
Merge tag 'iio-fixes-for-5.2a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus:
Jonathan writes: First set of IIO fixes for the 5.2 cycle. * ads124 - Avoid a buffer overrun when setting an array to 0. * ads8688 - Don't use the pollfunc timestamp as it isn't set and would be wrong anyway for a device that does sampling on demand. * ds4422 - Fix masking on register used for chip verification. Wrong address was being read. * mpu6050 - Fix the fifo layout for ICM20602 to avoid underreading and hence failure to move on to the next record in the fifo. * NPCM ADC - Make sure there is actually a valid regulator before reading its voltage. * tag 'iio-fixes-for-5.2a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: adc: ti-ads8688: fix timestamp is not updated in buffer iio: dac: ds4422/ds4424 fix chip verification iio: imu: mpu6050: Fix FIFO layout for ICM20602 iio: adc: ads124: avoid buffer overflow iio: adc: modify NPCM ADC read reference voltage
Diffstat (limited to 'drivers/iio/adc/npcm_adc.c')
-rw-r--r--drivers/iio/adc/npcm_adc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/npcm_adc.c b/drivers/iio/adc/npcm_adc.c
index 9e25bbec9c70..193b3b81de4d 100644
--- a/drivers/iio/adc/npcm_adc.c
+++ b/drivers/iio/adc/npcm_adc.c
@@ -149,7 +149,7 @@ static int npcm_adc_read_raw(struct iio_dev *indio_dev,
}
return IIO_VAL_INT;
case IIO_CHAN_INFO_SCALE:
- if (info->vref) {
+ if (!IS_ERR(info->vref)) {
vref_uv = regulator_get_voltage(info->vref);
*val = vref_uv / 1000;
} else {