summaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/npcm_adc.c
diff options
context:
space:
mode:
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 {