Re: [PATCH v14 03/11] iio: afe: rescale: add offset support

From: Liam Beguin
Date: Wed Feb 09 2022 - 11:36:04 EST


Hi Andy,

On Tue, Feb 08, 2022 at 03:42:22PM +0200, Andy Shevchenko wrote:
> On Tue, Feb 8, 2022 at 4:04 AM Liam Beguin <liambeguin@xxxxxxxxx> wrote:
> >
> > This is a preparatory change required for the addition of temperature
> > sensing front ends.
>
> ...
>
> > + if (iio_channel_has_info(rescale->source->channel,
> > + IIO_CHAN_INFO_OFFSET)) {
> > + ret = iio_read_channel_offset(rescale->source,
> > + &schan_off, NULL);
>
> > + if (ret != IIO_VAL_INT)
> > + return ret < 0 ? ret : -EOPNOTSUPP;
>
> Wonder if this actually should be
>
> if (ret < 0)
> return ret;
> if (ret != ...)
> return -EOP...;

Unless someone has a stong objection, I'd rather keep it as is.

Cheers,
Liam

> > + }
>
> --
> With Best Regards,
> Andy Shevchenko