mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
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>
This commit is contained in:
parent
01b7517513
commit
fcec89dfec
|
|
@ -535,10 +535,7 @@ static int pm8xxx_read_channel_rsv(struct pm8xxx_xoadc *adc,
|
|||
goto unlock;
|
||||
|
||||
/* Next the interrupt occurs */
|
||||
ret = wait_for_completion_timeout(&adc->complete,
|
||||
VADC_CONV_TIME_MAX_US);
|
||||
if (!ret) {
|
||||
dev_err(adc->dev, "conversion timed out\n");
|
||||
if (!wait_for_completion_timeout(&adc->complete, VADC_CONV_TIME_MAX_US)) {
|
||||
ret = -ETIMEDOUT;
|
||||
goto unlock;
|
||||
}
|
||||
|
|
@ -657,11 +654,8 @@ static int pm8xxx_read_raw(struct iio_dev *indio_dev,
|
|||
switch (mask) {
|
||||
case IIO_CHAN_INFO_PROCESSED:
|
||||
ch = pm8xxx_get_channel(adc, chan->address);
|
||||
if (!ch) {
|
||||
dev_err(adc->dev, "no such channel %lu\n",
|
||||
chan->address);
|
||||
if (!ch)
|
||||
return -EINVAL;
|
||||
}
|
||||
ret = pm8xxx_read_channel(adc, ch, &adc_code);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
@ -677,11 +671,8 @@ static int pm8xxx_read_raw(struct iio_dev *indio_dev,
|
|||
return IIO_VAL_INT;
|
||||
case IIO_CHAN_INFO_RAW:
|
||||
ch = pm8xxx_get_channel(adc, chan->address);
|
||||
if (!ch) {
|
||||
dev_err(adc->dev, "no such channel %lu\n",
|
||||
chan->address);
|
||||
if (!ch)
|
||||
return -EINVAL;
|
||||
}
|
||||
ret = pm8xxx_read_channel(adc, ch, &adc_code);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user