diff options
Diffstat (limited to 'drivers/iio/adc/rzg2l_adc.c')
-rw-r--r-- | drivers/iio/adc/rzg2l_adc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/iio/adc/rzg2l_adc.c b/drivers/iio/adc/rzg2l_adc.c index 5b09a93fdf34..0921ff2d9b3a 100644 --- a/drivers/iio/adc/rzg2l_adc.c +++ b/drivers/iio/adc/rzg2l_adc.c @@ -18,6 +18,7 @@ #include <linux/module.h> #include <linux/platform_device.h> #include <linux/pm_runtime.h> +#include <linux/property.h> #include <linux/reset.h> #define DRIVER_NAME "rzg2l-adc" @@ -260,9 +261,6 @@ static int rzg2l_adc_read_label(struct iio_dev *iio_dev, const struct iio_chan_spec *chan, char *label) { - if (chan->channel >= RZG2L_ADC_MAX_CHANNELS) - return -EINVAL; - return sysfs_emit(label, "%s\n", rzg2l_adc_channel_name[chan->channel]); } |