Merge tag 'iio-for-5.20a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23...
[linux-2.6-microblaze.git] / drivers / iio / adc / rzg2l_adc.c
index 5b09a93..0921ff2 100644 (file)
@@ -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]);
 }