diff options
author | Marijn Suijten <marijn.suijten@somainline.org> | 2023-05-02 01:17:36 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2023-05-13 18:28:10 +0100 |
commit | ac0abf75e1a94425f1cd503e1a895e003e2f40d6 (patch) | |
tree | f787883d86c9aac0bb9e8aa648947815b1973200 | |
parent | 0744ef3b2b63e705aee9cc26bbbf290480335880 (diff) | |
download | linux-stable-ac0abf75e1a94425f1cd503e1a895e003e2f40d6.tar.gz linux-stable-ac0abf75e1a94425f1cd503e1a895e003e2f40d6.tar.bz2 linux-stable-ac0abf75e1a94425f1cd503e1a895e003e2f40d6.zip |
iio: adc: qcom-spmi-adc5: Remove unnecessary datasheet_name NULL check
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>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20230502-iio-adc-propagate-fw-node-label-v3-4-6be5db6e6b5a@somainline.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r-- | drivers/iio/adc/qcom-spmi-adc5.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c index fe2000209d97..0a4fd3a46113 100644 --- a/drivers/iio/adc/qcom-spmi-adc5.c +++ b/drivers/iio/adc/qcom-spmi-adc5.c @@ -657,8 +657,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; } |