summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/npcm_adc.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-20 10:15:14 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-20 10:15:14 +0300
commit083a685c2ee035dd6c47242ea2de6d9eed3bf929 (patch)
treeb50c0e89fa21c9bb3a23e1afa31c257d819117b6 /drivers/iio/adc/npcm_adc.c
parenta188339ca5a396acc588e5851ed7e19f66b0ebd9 (diff)
parente6d12298310fa1dc11f1d747e05b168016057fdd (diff)
downloadlinux-083a685c2ee035dd6c47242ea2de6d9eed3bf929.tar.xz
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 {