Message ID | 20230116220909.196926-5-marijn.suijten@somainline.org |
---|---|
State | Superseded |
Headers | show |
Series | iio: adc: qcom-spmi-vadc: Propagate fw node label to userspace | expand |
diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c index 01aafd9df6c6..5def2b21f206 100644 --- a/drivers/iio/adc/qcom-spmi-adc5.c +++ b/drivers/iio/adc/qcom-spmi-adc5.c @@ -649,8 +649,7 @@ static int adc5_get_fw_channel_data(struct adc5_chip *adc, chan = chan & ADC_CHANNEL_MASK; } - if (chan > ADC5_PARALLEL_ISENSE_VBAT_IDATA || - !data->adc_chans[chan].datasheet_name) { + if (chan > ADC5_PARALLEL_ISENSE_VBAT_IDATA) { dev_err(dev, "%s invalid channel number %d\n", name, chan); return -EINVAL; }
datasheet_name is statically filled by a macro for every channel, and is nor should ever be set to NULL. Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> --- drivers/iio/adc/qcom-spmi-adc5.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)