diff options
Diffstat (limited to 'drivers/iio/adc/mcp3564.c')
| -rw-r--r-- | drivers/iio/adc/mcp3564.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iio/adc/mcp3564.c b/drivers/iio/adc/mcp3564.c index 6d60952dd33f..494b5d1c13a2 100644 --- a/drivers/iio/adc/mcp3564.c +++ b/drivers/iio/adc/mcp3564.c @@ -1204,6 +1204,9 @@ static int mcp3564_config(struct iio_dev *indio_dev, bool *use_internal_vref_att * try using fallback compatible in device tree to deal with some newer part number. */ adc->chip_info = spi_get_device_match_data(adc->spi); + if (!adc->chip_info) + return -ENODATA; + adc->have_vref = adc->chip_info->have_vref; } else { adc->chip_info = &mcp3564_chip_infos_tbl[ids]; |
