Skip to content

Commit fcec89d

Browse files
Smankusorsjic23
authored andcommitted
iio: adc: qcom-pm8xxx-xoadc: remove redundant error logs when reading values
Drop dev_err() logging for -EINVAL and -ETIMEDOUT cases and rely on return values to report errors, reducing unnecessary log noise. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Antony Kurniawan Soemardi <linux@smankusors.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent 01b7517 commit fcec89d

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

drivers/iio/adc/qcom-pm8xxx-xoadc.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -535,10 +535,7 @@ static int pm8xxx_read_channel_rsv(struct pm8xxx_xoadc *adc,
535535
goto unlock;
536536

537537
/* Next the interrupt occurs */
538-
ret = wait_for_completion_timeout(&adc->complete,
539-
VADC_CONV_TIME_MAX_US);
540-
if (!ret) {
541-
dev_err(adc->dev, "conversion timed out\n");
538+
if (!wait_for_completion_timeout(&adc->complete, VADC_CONV_TIME_MAX_US)) {
542539
ret = -ETIMEDOUT;
543540
goto unlock;
544541
}
@@ -657,11 +654,8 @@ static int pm8xxx_read_raw(struct iio_dev *indio_dev,
657654
switch (mask) {
658655
case IIO_CHAN_INFO_PROCESSED:
659656
ch = pm8xxx_get_channel(adc, chan->address);
660-
if (!ch) {
661-
dev_err(adc->dev, "no such channel %lu\n",
662-
chan->address);
657+
if (!ch)
663658
return -EINVAL;
664-
}
665659
ret = pm8xxx_read_channel(adc, ch, &adc_code);
666660
if (ret)
667661
return ret;
@@ -677,11 +671,8 @@ static int pm8xxx_read_raw(struct iio_dev *indio_dev,
677671
return IIO_VAL_INT;
678672
case IIO_CHAN_INFO_RAW:
679673
ch = pm8xxx_get_channel(adc, chan->address);
680-
if (!ch) {
681-
dev_err(adc->dev, "no such channel %lu\n",
682-
chan->address);
674+
if (!ch)
683675
return -EINVAL;
684-
}
685676
ret = pm8xxx_read_channel(adc, ch, &adc_code);
686677
if (ret)
687678
return ret;

0 commit comments

Comments
 (0)